diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-08-10 19:13:14 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-08-10 19:13:14 +0000 |
commit | a7020aee0004dd9a746e1f9404b10a7bcfdb35b5 (patch) | |
tree | 01ec696af56e5483456acdfacfe21146b8df9366 /clang/lib/AST/Stmt.cpp | |
parent | 8d48c8c6753ac4f9239bd1b75d0dcbfde68c0079 (diff) | |
download | bcm5719-llvm-a7020aee0004dd9a746e1f9404b10a7bcfdb35b5.tar.gz bcm5719-llvm-a7020aee0004dd9a746e1f9404b10a7bcfdb35b5.zip |
[ms-inline asm] Add clobbers to AST representation.
llvm-svn: 161686
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index f676711d7cc..9bf9980004f 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/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, |