aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-06-12 20:30:26 +0000
committerChad Rosier <mcrosier@apple.com>2012-06-12 20:30:26 +0000
commitb3b26bfe61558232ccd0053697a143a30ac1e079 (patch)
tree6f6954812de27747814271ca1b34b8978f36ab86 /lib/Parse/ParseStmt.cpp
parentafaa421c44f29e3e51d0cff9bfb80275f58a6bba (diff)
[ms-inline-asm] The __asm keyword is a statement separator, so multiple asm
statements are allowed on the same line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r--lib/Parse/ParseStmt.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index dd5ccc2f5d..af7d538adb 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -1710,6 +1710,11 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {
if (Tok.is(tok::eof))
break;
+ // The asm keyword is a statement separator, so multiple asm statements
+ // are allowed.
+ if (!InAsmComment && Tok.is(tok::kw_asm))
+ break;
+
if (!InAsmComment && Tok.is(tok::semi)) {
// A semicolon in an asm is the start of a comment.
InAsmComment = true;