[ms-inline asm] Don't consider tokens or immediates when computing clobbers, inputs and outputs.

llvm-svn: 163657
This commit is contained in:
Chad Rosier 2012-09-11 23:13:15 +00:00
parent 138568b60a
commit ee94a2ebd5
1 changed files with 4 additions and 0 deletions

View 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);