aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp
index 53d3f8e6..ca45144 100644
--- a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp
+++ b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp
@@ -56,10 +56,10 @@ ModuleSummaryIndexObjectFile::findBitcodeInMemBuffer(MemoryBufferRef Object) {
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: