[ms-inline asm] Pass Tokens to Sema and store them in the AST. No functional
change intended. No test case as there's no real way to test at this time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161342 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index ff6374c..763f8bd 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -583,10 +583,14 @@
std::copy(clobbers, clobbers + NumClobbers, Clobbers);
}
-MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc, std::string &asmstr,
- SourceLocation endloc)
- : Stmt(MSAsmStmtClass), AsmLoc(asmloc), EndLoc(endloc), AsmStr(asmstr),
+MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc,
+ SmallVectorImpl<Token> &asmtoks,
+ std::string &asmstr, SourceLocation endloc)
+ : Stmt(MSAsmStmtClass), AsmLoc(asmloc), EndLoc(endloc),
+ AsmToks(asmtoks.size()), AsmStr(asmstr),
IsSimple(true), IsVolatile(true) {
+ for (unsigned i = 0, e = asmtoks.size(); i != e; ++i)
+ AsmToks.push_back(asmtoks[i]);
}
ObjCForCollectionStmt::ObjCForCollectionStmt(Stmt *Elem, Expr *Collect,