clang-cl: Merge adjacent single-line __asm blocks
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Fri, 25 Jul 2014 02:27:14 +0000 (02:27 +0000)
committerEhsan Akhgari <ehsan.akhgari@gmail.com>
Fri, 25 Jul 2014 02:27:14 +0000 (02:27 +0000)
commit2f93b448a8ca44d90b5c8d0e0c655db72093fb1b
treedbeda8a4b7b3dc103bfbb55a912acc91308cb690
parentc9fa5dd61882c2b272d887abc3a33dae5bbbcedc
clang-cl: Merge adjacent single-line __asm blocks

Summary:
This patch extends the __asm parser to make it keep parsing input tokens
as inline assembly if a single-line __asm line is followed by another line
starting with __asm too.  It also makes sure that we correctly keep
matching braces in such situations by separating the notions of how many
braces we are matching and whether we are in single-line asm block mode.

Reviewers: rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4598

llvm-svn: 213916
clang/lib/Parse/ParseStmtAsm.cpp
clang/test/CodeGen/ms-inline-asm.c
clang/test/CodeGen/ms-inline-asm.cpp
clang/test/Parser/ms-inline-asm.c
clang/test/Sema/ms-inline-asm.c