diff options
| author | Chad Rosier <mcrosier@apple.com> | 2012-08-15 16:53:30 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@apple.com> | 2012-08-15 16:53:30 +0000 |
| commit | b6f46c1af9954bbeec7fdacfb352ab8483a69836 (patch) | |
| tree | 8d7fabe9c1b81ce83160d2cf3bb21cdd4f3191a3 /clang/lib/Sema/SemaStmt.cpp | |
| parent | 9f1509fe44a77237a8a222a4b9d01f6911c75139 (diff) | |
| download | bcm5719-llvm-b6f46c1af9954bbeec7fdacfb352ab8483a69836.tar.gz bcm5719-llvm-b6f46c1af9954bbeec7fdacfb352ab8483a69836.zip | |
[ms-inline asm] Add the left brace source location and improve the pretty
printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>.
llvm-svn: 161958
Diffstat (limited to 'clang/lib/Sema/SemaStmt.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaStmt.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index 5bcc33f107c..74e8cfed2e5 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -2852,6 +2852,7 @@ static std::string buildMSAsmString(Sema &SemaRef, } StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, + SourceLocation LBraceLoc, ArrayRef<Token> AsmToks, SourceLocation EndLoc) { // MS-style inline assembly is not fully supported, so emit a warning. @@ -2862,9 +2863,9 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, if (AsmToks.empty()) { StringRef AsmString; MSAsmStmt *NS = - new (Context) MSAsmStmt(Context, AsmLoc, /* IsSimple */ true, - /* IsVolatile */ true, AsmToks, AsmString, - Clobbers, EndLoc); + new (Context) MSAsmStmt(Context, AsmLoc, LBraceLoc, + /* IsSimple */ true, /* IsVolatile */ true, + AsmToks, AsmString, Clobbers, EndLoc); return Owned(NS); } @@ -2888,9 +2889,9 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, // patchMSAsmStrings doesn't correctly patch non-simple asm statements. if (!IsSimple) { MSAsmStmt *NS = - new (Context) MSAsmStmt(Context, AsmLoc, /* IsSimple */ true, - /* IsVolatile */ true, AsmToks, AsmString, - Clobbers, EndLoc); + new (Context) MSAsmStmt(Context, AsmLoc, LBraceLoc, + /* IsSimple */ true, /* IsVolatile */ true, + AsmToks, AsmString, Clobbers, EndLoc); return Owned(NS); } @@ -2980,7 +2981,8 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, } MSAsmStmt *NS = - new (Context) MSAsmStmt(Context, AsmLoc, IsSimple, /* IsVolatile */ true, + new (Context) MSAsmStmt(Context, AsmLoc, LBraceLoc, + IsSimple, /* IsVolatile */ true, AsmToks, AsmString, Clobbers, EndLoc); return Owned(NS); |

