]> granicus.if.org Git - clang/commitdiff
[ms-inline asm] Don't consider tokens or immediates when computing clobbers, inputs...
authorChad Rosier <mcrosier@apple.com>
Tue, 11 Sep 2012 23:13:15 +0000 (23:13 +0000)
committerChad Rosier <mcrosier@apple.com>
Tue, 11 Sep 2012 23:13:15 +0000 (23:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163657 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaStmtAsm.cpp

index 78e55317251bbceaa110c94e793ac070338c117d..1a7d917c15960cb8d1b8c02c2a676f8ec91a1ff1 100644 (file)
@@ -36,6 +36,7 @@
 #include "llvm/MC/MCTargetAsmParser.h"
 #include "llvm/MC/MCParser/MCAsmLexer.h"
 #include "llvm/MC/MCParser/MCAsmParser.h"
+#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/TargetSelect.h"
@@ -573,6 +574,9 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc,
     // Build the list of clobbers, outputs and inputs.
     unsigned NumDefs = Desc.getNumDefs();
     for (unsigned i = 1, e = Operands.size(); i != e; ++i) {
+      if (Operands[i]->isToken() || Operands[i]->isImm())
+        continue;
+
       unsigned NumMCOperands;
       unsigned MCIdx = TargetParser->getMCInstOperandNum(Kind, Inst, Operands,
                                                          i, NumMCOperands);