forked from OSchip/llvm-project
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
d9dce561b6
commit
e59f8ca49e
|
@ -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…
Reference in New Issue