diff options
Diffstat (limited to 'contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h')
-rw-r--r-- | contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h b/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h index 1e7d211..ce0864f 100644 --- a/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h +++ b/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h @@ -42,12 +42,13 @@ public: PM.run(M); std::unique_ptr<MemoryBuffer> ObjBuffer( new ObjectMemoryBuffer(std::move(ObjBufferSV))); - ErrorOr<std::unique_ptr<object::ObjectFile>> Obj = + Expected<std::unique_ptr<object::ObjectFile>> Obj = object::ObjectFile::createObjectFile(ObjBuffer->getMemBufferRef()); - // TODO: Actually report errors helpfully. typedef object::OwningBinary<object::ObjectFile> OwningObj; if (Obj) return OwningObj(std::move(*Obj), std::move(ObjBuffer)); + // TODO: Actually report errors helpfully. + consumeError(Obj.takeError()); return OwningObj(nullptr, nullptr); } |