From 90be58afce42b766dcb0a5bcaa54d136ffb63b58 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Mon, 4 Jan 2010 22:37:17 +0000 Subject: Remember if the AsmStmt came from Microsoft-style inline assembly code. llvm-svn: 92526 --- clang/lib/Sema/Sema.h | 3 ++- clang/lib/Sema/SemaStmt.cpp | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'clang/lib/Sema') diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 110a6268355..df25025d773 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -1383,7 +1383,8 @@ public: MultiExprArg Exprs, ExprArg AsmString, MultiExprArg Clobbers, - SourceLocation RParenLoc); + SourceLocation RParenLoc, + bool MSAsm = false); virtual OwningStmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc, SourceLocation RParen, diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index b8928c36e7b..7855a7f6093 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -1157,7 +1157,8 @@ Sema::OwningStmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc, MultiExprArg exprs, ExprArg asmString, MultiExprArg clobbers, - SourceLocation RParenLoc) { + SourceLocation RParenLoc, + bool MSAsm) { unsigned NumClobbers = clobbers.size(); StringLiteral **Constraints = reinterpret_cast(constraints.get()); @@ -1261,9 +1262,9 @@ Sema::OwningStmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc, asmString.release(); clobbers.release(); AsmStmt *NS = - new (Context) AsmStmt(AsmLoc, IsSimple, IsVolatile, NumOutputs, NumInputs, - Names, Constraints, Exprs, AsmString, NumClobbers, - Clobbers, RParenLoc); + new (Context) AsmStmt(AsmLoc, IsSimple, IsVolatile, MSAsm, NumOutputs, + NumInputs, Names, Constraints, Exprs, AsmString, + NumClobbers, Clobbers, RParenLoc); // Validate the asm string, ensuring it makes sense given the operands we // have. llvm::SmallVector Pieces; -- cgit v1.2.3