mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-10 22:43:53 +00:00
An MCDisassembler has the option to not implement
getEDInfo(), in which case this code would dereference NULL. EDInst can already handle NULL info, so avoid the dereference and pass NULL through. Reviewed by Sean Callanan llvm-svn: 128904
This commit is contained in:
parent
7bdaed671d
commit
a1467abb18
@ -254,9 +254,11 @@ EDInst *EDDisassembler::createInst(EDByteReaderCallback byteReader,
|
||||
delete inst;
|
||||
return NULL;
|
||||
} else {
|
||||
const llvm::EDInstInfo *thisInstInfo;
|
||||
const llvm::EDInstInfo *thisInstInfo = NULL;
|
||||
|
||||
thisInstInfo = &InstInfos[inst->getOpcode()];
|
||||
if (InstInfos) {
|
||||
thisInstInfo = &InstInfos[inst->getOpcode()];
|
||||
}
|
||||
|
||||
EDInst* sdInst = new EDInst(inst, byteSize, *this, thisInstInfo);
|
||||
return sdInst;
|
||||
|
Loading…
x
Reference in New Issue
Block a user