aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-08-15 16:53:30 +0000
committerChad Rosier <mcrosier@apple.com>2012-08-15 16:53:30 +0000
commit7bd092b054444e9800e8de1d8d71c408dbdc8ead (patch)
tree23fbaa5e1f649d1ff2fea7b134353493abacd874 /lib/Sema/SemaStmt.cpp
parent7f397c5d97fc0c11333d939f2c07bc3b230956e2 (diff)
[ms-inline asm] Add the left brace source location and improve the pretty
printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 5bcc33f107..74e8cfed2e 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/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);