mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
in the case where an instruction only has one implementation
of a mneumonic, report operand errors with better location info. For example, we now report: t.s:6:14: error: invalid operand for instruction cwtl $1 ^ but we fail for common cases like: t.s:11:4: error: invalid operand for instruction addl $1, $1 ^ because we don't know if this is supposed to be the reg/imm or imm/reg form. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -83,7 +83,8 @@ private:
|
||||
bool MatchInstruction(SMLoc IDLoc,
|
||||
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
MCInst &Inst) {
|
||||
if (MatchInstructionImpl(Operands, Inst) == Match_Success)
|
||||
unsigned ErrorInfo;
|
||||
if (MatchInstructionImpl(Operands, Inst, ErrorInfo) == Match_Success)
|
||||
return false;
|
||||
|
||||
// FIXME: We should give nicer diagnostics about the exact failure.
|
||||
|
Reference in New Issue
Block a user