diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h index 8dbcf5dd5e40..1b5d45317d04 100644 --- a/clang/include/clang/AST/Stmt.h +++ b/clang/include/clang/AST/Stmt.h @@ -1632,8 +1632,8 @@ class MSAsmStmt : public Stmt { Stmt **Exprs; public: - MSAsmStmt(ASTContext &C, SourceLocation asmloc, - ArrayRef asmtoks, std::string &asmstr, + MSAsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple, + bool isvolatile, ArrayRef asmtoks, std::string &asmstr, SourceLocation endloc); SourceLocation getAsmLoc() const { return AsmLoc; } diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index 69dc170d9e13..2894720b76f4 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -584,10 +584,11 @@ AsmStmt::AsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple, } MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc, - ArrayRef asmtoks, + bool issimple, bool isvolatile, ArrayRef asmtoks, std::string &asmstr, SourceLocation endloc) : Stmt(MSAsmStmtClass), AsmLoc(asmloc), EndLoc(endloc), - AsmStr(asmstr), IsSimple(true), IsVolatile(true), NumAsmToks(asmtoks.size()) { + AsmStr(asmstr), IsSimple(issimple), IsVolatile(isvolatile), + NumAsmToks(asmtoks.size()) { AsmToks = new (C) Token[NumAsmToks]; for (unsigned i = 0, e = NumAsmToks; i != e; ++i) diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index 5df1a50655c7..2161aebe38e3 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -2755,7 +2755,8 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, Diag(AsmLoc, diag::warn_unsupported_msasm); MSAsmStmt *NS = - new (Context) MSAsmStmt(Context, AsmLoc, AsmToks, AsmString, EndLoc); + new (Context) MSAsmStmt(Context, AsmLoc, true, true, AsmToks, AsmString, + EndLoc); return Owned(NS); }