Fixed a bug in the enhanced disassembly tester that

caused it to only parse one line of input.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126301 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sean Callanan
2011-02-23 03:29:41 +00:00
parent 2b943566f3
commit 3894a795e6

View File

@ -235,9 +235,12 @@ int Disassembler::disassembleEnhanced(const std::string &TS,
return -1;
}
while (ByteArray.size()) {
EDInst *inst =
disassembler->createInst(byteArrayReader, 0, &ByteArray);
ByteArray.erase (ByteArray.begin(), ByteArray.begin() + inst->byteSize());
if (inst == 0) {
errs() << "error: Didn't get an instruction\n";
return -1;
@ -336,6 +339,7 @@ int Disassembler::disassembleEnhanced(const std::string &TS,
}
Out << '\n';
}
return 0;
}