[ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,

this is the index of the operand that failed to match.

llvm-svn: 162296
This commit is contained in:
Chad Rosier 2012-08-21 18:15:08 +00:00
parent 79e766c38e
commit 19160b6e39
1 changed files with 3 additions and 1 deletions

View File

@ -589,8 +589,10 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc,
assert (!HadError && "Unexpected error parsing instruction");
// Match the MCInstr.
unsigned ErrorInfo;
SmallVector<llvm::MCInst, 2> Instrs;
HadError = TargetParser->MatchInstruction(IDLoc, Operands, Instrs);
HadError = TargetParser->MatchInstruction(IDLoc, Operands, Instrs,
ErrorInfo);
assert (!HadError && "Unexpected error matching instruction");
assert ((Instrs.size() == 1) && "Expected only a single instruction.");