summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit075608ecfc8cce215dbf57c29622cb6ebc497136 (patch)
tree062aa10057933ec31b68cce48caa7f24e7a3591b /clang/lib
parent72aea01b6e32a0fd0c53e25a7e841d80eb4040e2 (diff)
downloadbcm5719-llvm-075608ecfc8cce215dbf57c29622cb6ebc497136.tar.gz
bcm5719-llvm-075608ecfc8cce215dbf57c29622cb6ebc497136.zip
[ms-inline-asm] The __asm keyword is a statement separator, so multiple asm
statements are allowed on the same line. llvm-svn: 158372
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Parse/ParseStmt.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index dd5ccc2f5df..af7d538adb5 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud