aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-08-10 19:13:14 +0000
committerChad Rosier <mcrosier@apple.com>2012-08-10 19:13:14 +0000
commit4399ea9d473365224d9e4db0cd94aab849eb59b7 (patch)
treeabb9c64ea22cdb4e7157efd71907dc39e4b9b072 /lib/AST/Stmt.cpp
parent6bd3291605a3034b858c8aeecc6990fa4f979f6c (diff)
[ms-inline asm] Add clobbers to AST representation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r--lib/AST/Stmt.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index f676711d7c..9bf9980004 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -586,10 +586,11 @@ AsmStmt::AsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple,
MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc,
bool issimple, bool isvolatile, ArrayRef<Token> asmtoks,
ArrayRef<unsigned> lineends, StringRef asmstr,
- SourceLocation endloc)
+ ArrayRef<std::string> clobbers, SourceLocation endloc)
: Stmt(MSAsmStmtClass), AsmLoc(asmloc), EndLoc(endloc),
AsmStr(asmstr.str()), IsSimple(issimple), IsVolatile(isvolatile),
- NumAsmToks(asmtoks.size()), NumLineEnds(lineends.size()) {
+ NumAsmToks(asmtoks.size()), NumLineEnds(lineends.size()),
+ NumClobbers(clobbers.size()) {
AsmToks = new (C) Token[NumAsmToks];
for (unsigned i = 0, e = NumAsmToks; i != e; ++i)
@@ -598,6 +599,10 @@ MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc,
LineEnds = new (C) unsigned[NumLineEnds];
for (unsigned i = 0, e = NumLineEnds; i != e; ++i)
LineEnds[i] = lineends[i];
+
+ Clobbers = new (C) std::string[NumClobbers];
+ for (unsigned i = 0, e = NumClobbers; i != e; ++i)
+ Clobbers[i] = clobbers[i];
}
ObjCForCollectionStmt::ObjCForCollectionStmt(Stmt *Elem, Expr *Collect,