mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Moved an access to an object past a NULL check,
making the MC disassembler tester more robust. llvm-svn: 129175
This commit is contained in:
parent
7adf6f4b5c
commit
b64c921079
@ -240,12 +240,12 @@ int Disassembler::disassembleEnhanced(const std::string &TS,
|
||||
OwningPtr<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;
|
||||
}
|
||||
|
||||
ByteArray.erase (ByteArray.begin(), ByteArray.begin() + inst->byteSize());
|
||||
|
||||
unsigned numTokens = inst->numTokens();
|
||||
if ((int)numTokens < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user