aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-08-21 18:15:08 +0000
committerChad Rosier <mcrosier@apple.com>2012-08-21 18:15:08 +0000
commit83591b6d3f20ee84f4abe1c2574e90736aa84b11 (patch)
tree6699112d5058ee447cb1b4aa3f080a2bcb7258b3
parent2e0b8d9c0b16c4f3e3bed992205ce43a0908915d (diff)
[ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,
this is the index of the operand that failed to match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162296 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaStmtAsm.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp
index b4b91ec445..d03a0df3f9 100644
--- a/lib/Sema/SemaStmtAsm.cpp
+++ b/lib/Sema/SemaStmtAsm.cpp
@@ -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.");