aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmtAsm.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-09-11 23:13:15 +0000
committerChad Rosier <mcrosier@apple.com>2012-09-11 23:13:15 +0000
commitfb700265b6e452a3cfd3abc73102fef11d103d4a (patch)
tree99040f5490fda65a43b7db7fac1854e75a871f8e /lib/Sema/SemaStmtAsm.cpp
parentf9ee0bacd27085417dedf1a9f5df8a4cb5a758c1 (diff)
[ms-inline asm] Don't consider tokens or immediates when computing clobbers, inputs and outputs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmtAsm.cpp')
-rw-r--r--lib/Sema/SemaStmtAsm.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp
index 78e5531725..1a7d917c15 100644
--- a/lib/Sema/SemaStmtAsm.cpp
+++ b/lib/Sema/SemaStmtAsm.cpp
@@ -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);