diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-08-08 19:48:07 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-08-08 19:48:07 +0000 |
commit | 3ed0bd9938979ff924a9961ae0a34b2725da3e9a (patch) | |
tree | 62953e03a84b3aff2a2aecc4c997ccd519632422 /clang/lib/AST/Stmt.cpp | |
parent | 55a2d9397c62e66f3010e4bc4e7ea3b057c047d5 (diff) | |
download | bcm5719-llvm-3ed0bd9938979ff924a9961ae0a34b2725da3e9a.tar.gz bcm5719-llvm-3ed0bd9938979ff924a9961ae0a34b2725da3e9a.zip |
[ms-inline asm] Refactor the logic to generate the AsmString into Sema. No
functional change intended.
llvm-svn: 161518
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 2894720b76f..e5ff75eac6d 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -585,14 +585,19 @@ AsmStmt::AsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple, MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple, bool isvolatile, ArrayRef<Token> asmtoks, - std::string &asmstr, SourceLocation endloc) + ArrayRef<unsigned> lineends, std::string &asmstr, + SourceLocation endloc) : Stmt(MSAsmStmtClass), AsmLoc(asmloc), EndLoc(endloc), AsmStr(asmstr), IsSimple(issimple), IsVolatile(isvolatile), - NumAsmToks(asmtoks.size()) { + NumAsmToks(asmtoks.size()), NumLineEnds(lineends.size()) { AsmToks = new (C) Token[NumAsmToks]; for (unsigned i = 0, e = NumAsmToks; i != e; ++i) AsmToks[i] = asmtoks[i]; + + LineEnds = new (C) unsigned[NumLineEnds]; + for (unsigned i = 0, e = NumLineEnds; i != e; ++i) + LineEnds[i] = lineends[i]; } ObjCForCollectionStmt::ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, |