aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-08-08 21:08:20 +0000
committerChad Rosier <mcrosier@apple.com>2012-08-08 21:08:20 +0000
commit871ee56e8003b8ce6f0658351ca051db504d9dc4 (patch)
tree50c0399e2a0f451341d0fae45a5488bd74a7dd77
parentd854c63dca5ef01c505fbd43684d8bf3f3691cc7 (diff)
[ms-inline asm] Make sure IsSimple is correctly handled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161522 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaStmt.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 2ec9d241a3..8ba28b1005 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -2786,6 +2786,9 @@ static std::string PatchMSAsmString(Sema &SemaRef, bool &IsSimple,
SourceLocation AsmLoc,
ArrayRef<Token> AsmToks,
const TargetInfo &TI) {
+ // Assume simple asm stmt until we parse a non-register identifer.
+ IsSimple = true;
+
if (!AsmToks.size())
return "";
@@ -2793,9 +2796,6 @@ static std::string PatchMSAsmString(Sema &SemaRef, bool &IsSimple,
IdentifierInfo *II = AsmToks[0].getIdentifierInfo();
Res = II->getName().str();
- // Assume simple asm stmt until we parse a non-register identifer.
- IsSimple = true;
-
// Check the operands.
for (unsigned i = 1, e = AsmToks.size(); i != e; ++i) {
if (needSpaceAsmToken(AsmToks[i]))