summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/IRObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/IRObjectFile.cpp')
-rw-r--r--llvm/lib/Object/IRObjectFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp
index 49737b5f6f9..a4b97efc645 100644
--- a/llvm/lib/Object/IRObjectFile.cpp
+++ b/llvm/lib/Object/IRObjectFile.cpp
@@ -285,10 +285,10 @@ ErrorOr<MemoryBufferRef> IRObjectFile::findBitcodeInMemBuffer(MemoryBufferRef Ob
case sys::fs::file_magic::elf_relocatable:
case sys::fs::file_magic::macho_object:
case sys::fs::file_magic::coff_object: {
- ErrorOr<std::unique_ptr<ObjectFile>> ObjFile =
+ Expected<std::unique_ptr<ObjectFile>> ObjFile =
ObjectFile::createObjectFile(Object, Type);
if (!ObjFile)
- return ObjFile.getError();
+ return errorToErrorCode(ObjFile.takeError());
return findBitcodeInObject(*ObjFile->get());
}
default:
OpenPOWER on IntegriCloud