mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
[MCJIT] Improve a RuntimeDyldChecker diagnostic.
When a RuntimeDyldChecker test requests an invalid operand for an instruction, print the decoded instruction to aid diagnosis. llvm-svn: 213202
This commit is contained in:
parent
d8b9bfa0c2
commit
ddc836290a
@ -233,9 +233,13 @@ namespace llvm {
|
||||
std::string ErrMsg;
|
||||
raw_string_ostream ErrMsgStream(ErrMsg);
|
||||
ErrMsgStream << "Invalid operand index '" << format("%i", OpIdx)
|
||||
<< " for instruction '" << Symbol
|
||||
<< ". Instruction has only "
|
||||
<< format("%i", Inst.getNumOperands()) << " operands.";
|
||||
<< "' for instruction '" << Symbol
|
||||
<< "'. Instruction has only "
|
||||
<< format("%i", Inst.getNumOperands())
|
||||
<< " operands.\nInstruction is:\n ";
|
||||
Inst.dump_pretty(ErrMsgStream,
|
||||
Checker.Disassembler->getContext().getAsmInfo(),
|
||||
Checker.InstPrinter);
|
||||
return std::make_pair(EvalResult(ErrMsgStream.str()), "");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user