From 64bfcbbc58ad485db157190496f0f39156b5a516 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Tue, 21 Aug 2012 18:14:59 +0000 Subject: [ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general, this is the index of the operand that failed to match. Note: This may cause a buildbot failure due to an API mismatch in clang. Should recover with my next commit to clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162295 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/AsmParser/X86AsmParser.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index fbbaa95..c139dbc 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -67,7 +67,8 @@ private: bool MatchInstruction(SMLoc IDLoc, SmallVectorImpl &Operands, - SmallVectorImpl &MCInsts); + SmallVectorImpl &MCInsts, + unsigned &OrigErrorInfo); /// isSrcOp - Returns true if operand is either (%rsi) or %ds:%(rsi) /// in 64bit mode or (%esi) or %es:(%esi) in 32bit mode. @@ -1513,7 +1514,8 @@ MatchAndEmitInstruction(SMLoc IDLoc, SmallVectorImpl &Operands, MCStreamer &Out) { SmallVector Insts; - bool Error = MatchInstruction(IDLoc, Operands, Insts); + unsigned ErrorInfo; + bool Error = MatchInstruction(IDLoc, Operands, Insts, ErrorInfo); if (!Error) for (unsigned i = 0, e = Insts.size(); i != e; ++i) Out.EmitInstruction(Insts[i]); @@ -1523,7 +1525,8 @@ MatchAndEmitInstruction(SMLoc IDLoc, bool X86AsmParser:: MatchInstruction(SMLoc IDLoc, SmallVectorImpl &Operands, - SmallVectorImpl &MCInsts) { + SmallVectorImpl &MCInsts, + unsigned &OrigErrorInfo) { assert(!Operands.empty() && "Unexpect empty operand list!"); X86Operand *Op = static_cast(Operands[0]); assert(Op->isToken() && "Leading operand should always be a mnemonic!"); @@ -1558,7 +1561,6 @@ MatchInstruction(SMLoc IDLoc, } bool WasOriginallyInvalidOperand = false; - unsigned OrigErrorInfo; MCInst Inst; // First, try a direct match. -- cgit v1.1