summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/LTO/LTOModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index f7fe85e5085..b26c371a082 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -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;
OpenPOWER on IntegriCloud