mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Missed removing one of the assert()'s from the LLVMCreateDisasmCPU() library
API with my 176880 revision. If a bad Triple is passed in it can also assert. In this case too it should just return 0 to indicate failure to create the disassembler. rdar://13955214 llvm-svn: 182542
This commit is contained in:
parent
e67a19eff8
commit
cd9987ce0f
@ -40,7 +40,8 @@ LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *Triple, const char *CPU,
|
||||
// Get the target.
|
||||
std::string Error;
|
||||
const Target *TheTarget = TargetRegistry::lookupTarget(Triple, Error);
|
||||
assert(TheTarget && "Unable to create target!");
|
||||
if (!TheTarget)
|
||||
return 0;
|
||||
|
||||
const MCRegisterInfo *MRI = TheTarget->createMCRegInfo(Triple);
|
||||
if (!MRI)
|
||||
|
Loading…
x
Reference in New Issue
Block a user