Skip to content

Commit 45e390c

Browse files
committed
[ORC] Report paths in errors when creating StaticLibrarySearchGenerators.
1 parent 412c6d1 commit 45e390c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ Expected<std::unique_ptr<StaticLibraryDefinitionGenerator>>
273273
StaticLibraryDefinitionGenerator::Load(
274274
ObjectLayer &L, const char *FileName,
275275
GetObjectFileInterface GetObjFileInterface) {
276-
auto ArchiveBuffer = errorOrToExpected(MemoryBuffer::getFile(FileName));
276+
auto ArchiveBuffer = MemoryBuffer::getFile(FileName);
277277

278278
if (!ArchiveBuffer)
279-
return ArchiveBuffer.takeError();
279+
return createFileError(FileName, ArchiveBuffer.getError());
280280

281281
return Create(L, std::move(*ArchiveBuffer), std::move(GetObjFileInterface));
282282
}
@@ -288,7 +288,7 @@ StaticLibraryDefinitionGenerator::Load(
288288

289289
auto B = object::createBinary(FileName);
290290
if (!B)
291-
return B.takeError();
291+
return createFileError(FileName, B.takeError());
292292

293293
// If this is a regular archive then create an instance from it.
294294
if (isa<object::Archive>(B->getBinary()))

0 commit comments

Comments
 (0)