mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[LTO] Return proper error object rather than null LTOModule
This caused a crash in LTOModule::createInLocalContext. rdar://37926841 llvm-svn: 327359
This commit is contained in:
parent
923d744cb9
commit
0a3605e3a4
@ -208,7 +208,7 @@ LTOModule::makeLTOModule(MemoryBufferRef Buffer, const TargetOptions &options,
|
||||
std::string errMsg;
|
||||
const Target *march = TargetRegistry::lookupTarget(TripleStr, errMsg);
|
||||
if (!march)
|
||||
return std::unique_ptr<LTOModule>(nullptr);
|
||||
return make_error_code(object::object_error::arch_not_found);
|
||||
|
||||
// construct LTOModule, hand over ownership of module and target
|
||||
SubtargetFeatures Features;
|
||||
|
Loading…
x
Reference in New Issue
Block a user