[PATCH] D124940: [AIX] llvm-link support big archive.
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 13:29:43 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc38ef550de81: [AIX] llvm-link support big archive. (authored by zhijian <zhijian at ca.ibm.com>).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124940/new/
https://reviews.llvm.org/D124940
Files:
llvm/test/tools/llvm-link/archivell.ll
llvm/tools/llvm-link/llvm-link.cpp
Index: llvm/tools/llvm-link/llvm-link.cpp
===================================================================
--- llvm/tools/llvm-link/llvm-link.cpp
+++ llvm/tools/llvm-link/llvm-link.cpp
@@ -164,11 +164,16 @@
if (Verbose)
errs() << "Reading library archive file '" << ArchiveName
<< "' to memory\n";
- Error Err = Error::success();
- object::Archive Archive(*Buffer, Err);
- ExitOnErr(std::move(Err));
+ Expected<std::unique_ptr<object::Archive>> ArchiveOrError =
+ object::Archive::create(Buffer->getMemBufferRef());
+ if (!ArchiveOrError)
+ ExitOnErr(ArchiveOrError.takeError());
+
+ std::unique_ptr<object::Archive> Archive = std::move(ArchiveOrError.get());
+
Linker L(*Result);
- for (const object::Archive::Child &C : Archive.children(Err)) {
+ Error Err = Error::success();
+ for (const object::Archive::Child &C : Archive->children(Err)) {
Expected<StringRef> Ename = C.getName();
if (Error E = Ename.takeError()) {
errs() << Argv0 << ": ";
Index: llvm/test/tools/llvm-link/archivell.ll
===================================================================
--- llvm/test/tools/llvm-link/archivell.ll
+++ llvm/test/tools/llvm-link/archivell.ll
@@ -1,4 +1,3 @@
-# XFAIL: system-aix
# RUN: llvm-ar cr %t.fg.a %S/Inputs/f.ll %S/Inputs/g.ll
# RUN: not llvm-link %S/Inputs/h.ll %t.fg.a -o %t.linked.bc 2>&1 | FileCheck %s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124940.429835.patch
Type: text/x-patch
Size: 1384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220516/10eef51d/attachment.bin>
More information about the llvm-commits
mailing list