[lld] [llvm] [llvm-readobj][Object][COFF] Print COFF import library symbol export name. (PR #78769)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 14:50:47 PST 2024


================
@@ -52,6 +52,32 @@ StringRef COFFImportFile::getFileFormatName() const {
   }
 }
 
+StringRef COFFImportFile::getExportName() const {
+  const coff_import_header *hdr = getCOFFImportHeader();
+  StringRef name = StringRef(Data.getBufferStart() + sizeof(*hdr));
+
+  auto ltrim1 = [](StringRef s, const char *chars) {
----------------
efriedma-quic wrote:

`StringRef chars`, then you can use `chars.contains(s[0])`.

https://github.com/llvm/llvm-project/pull/78769


More information about the llvm-commits mailing list