[PATCH] D48413: [llvm-strip] Add initial support for static libraries
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 14:35:49 PDT 2018
alexshap added inline comments.
================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:481-483
+ if (Error E = writeArchive(Config.OutputFilename, NewArchiveMembers, true,
+ Ar->kind(), true, Ar->isThin()))
+ reportError(Config.OutputFilename, std::move(E));
----------------
alexshap wrote:
> jhenderson wrote:
> > Test case?
> again, this Error E can be non-empty if, for example, the syscalls `open` or `write` have failed (+ there might other reasons why writeArchive has returned non-success).
> I'm somehow hesitant to test / verify it here - llvm-objcopy is just not the right place for testing writeArchive error-handling. P.S. the same errors might happen when llvm-objcopy or any other tool writes the output to a any file.
but since this error is non-recoverable / must not be ignored - we should report it and exit(1) - that's what reportError does.
Repository:
rL LLVM
https://reviews.llvm.org/D48413
More information about the llvm-commits
mailing list