reject invalid input with a caret, e.g.:

simple-tests.txt:16:1: error: invalid instruction
0xff 0xff
^

llvm-svn: 91898
This commit is contained in:
Chris Lattner 2009-12-22 06:58:29 +00:00
parent 0dc93264b1
commit e9288e57d9

View File

@ -61,8 +61,8 @@ static bool PrintInst(const llvm::MCDisassembler &DisAsm,
llvm::raw_string_ostream verboseOS(verboseOStr);
if (!DisAsm.getInstruction(Inst, Size, memoryObject, 0, verboseOS)) {
// FIXME: Caret.
errs() << "error: invalid instruction\n";
SM.PrintMessage(SMLoc::getFromPointer(Bytes[0].second),
"invalid instruction", "error");
errs() << "Diagnostic log:" << '\n';
errs() << verboseOS.str() << '\n';
return true;