diff options
author | Keith Smiley <keithbsmiley@gmail.com> | 2022-02-02 17:19:58 -0800 |
---|---|---|
committer | Keith Smiley <keithbsmiley@gmail.com> | 2022-02-03 10:22:06 -0800 |
commit | ffea9fc10dcd13ea3b9178a6320c7351b8778978 (patch) | |
tree | 7bbdf7dc16db7d9086fdbe9f5afcb1c5e3d95478 /llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp | |
parent | 28ab5944cd75b790bc6a60ab82e80bc6d4972b63 (diff) | |
download | llvm-ffea9fc10dcd13ea3b9178a6320c7351b8778978.zip llvm-ffea9fc10dcd13ea3b9178a6320c7351b8778978.tar.gz llvm-ffea9fc10dcd13ea3b9178a6320c7351b8778978.tar.bz2 |
[llvm-libtool-darwin] Improve warning message for no symbols
This more closely mirrors apple's libtool, and also potentially makes it
clearer for multi-arch archives where the issue lies.
Differential Revision: https://reviews.llvm.org/D118867
Diffstat (limited to 'llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp')
-rw-r--r-- | llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp index 9355d38..a5c664c 100644 --- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp +++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp @@ -360,8 +360,9 @@ private: auto *O = dyn_cast<MachOObjectFile>(ObjOrErr->get()); uint32_t FileCPUType, FileCPUSubtype; + StringRef ArchName = O->getArchTriple().getArchName(); std::tie(FileCPUType, FileCPUSubtype) = MachO::getCPUTypeFromArchitecture( - MachO::getArchitectureFromName(O->getArchTriple().getArchName())); + MachO::getArchitectureFromName(ArchName)); // If -arch_only is specified then skip this file if it doesn't match // the architecture specified. @@ -370,7 +371,9 @@ private: } if (!NoWarningForNoSymbols && O->symbols().empty()) - WithColor::warning() << Member.MemberName + " has no symbols\n"; + WithColor::warning() << "'" + Member.MemberName + + "': has no symbols for architecture " + + ArchName + "\n"; uint64_t FileCPUID = getCPUID(FileCPUType, FileCPUSubtype); Builder.Data.MembersPerArchitecture[FileCPUID].push_back( |