summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e0fd412)
When a RuntimeDyldChecker test requests an invalid operand for an instruction,
print the decoded instruction to aid diagnosis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213202
91177308-0d34-0410-b5e6-
96231b3b80d8
std::string ErrMsg;
raw_string_ostream ErrMsgStream(ErrMsg);
ErrMsgStream << "Invalid operand index '" << format("%i", OpIdx)
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()), "");
}
return std::make_pair(EvalResult(ErrMsgStream.str()), "");
}