[llvm] [llvm-objcopy] Add --verbose option to llvm-strip/llvm-objcopy (PR #196611)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 01:41:14 PDT 2026
================
@@ -33,6 +33,16 @@ objcopy::createNewArchiveMembers(const MultiFormatConfig &Config,
return createFileError(Ar.getFileName() + "(" + *ChildNameOrErr + ")",
ChildOrErr.takeError());
+ const CommonConfig &CC = Config.getCommonConfig();
+ if (CC.Verbose) {
+ StringRef FormatName = getObjectFormatName(*ChildOrErr->get());
+ printCopyMessage(
+ (Twine(Ar.getFileName()) + "(" + *ChildNameOrErr + ")").str(),
----------------
jh7370 wrote:
As the name formatting is repeated twice here and also shared with the error message above, I think it's worth a little helper function or lambda to format the name.
https://github.com/llvm/llvm-project/pull/196611
More information about the llvm-commits
mailing list