[llvm] big archive recognition by the llvm-symbolizer (PR #150401)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 00:10:04 PDT 2025


================
@@ -227,25 +227,30 @@ class LLVMSymbolizer {
   /// Sum of the sizes of the cached binaries.
   size_t CacheSize = 0;
 
-  /// Parsed object file for path/architecture pair, where "path" refers
-  /// to Mach-O universal binary.
-  std::map<std::pair<std::string, std::string>, std::unique_ptr<ObjectFile>>
-      ObjectForUBPathAndArch;
-
   struct ArchiveCacheKey {
-    std::string ArchivePath; // Storage for StringRef
-    std::string MemberName;  // Storage for StringRef
-    std::string ArchName;    // Storage for StringRef
+    std::string ArchivePath;
+    std::string MemberName;
+    std::string ArchName;
 
-    // Required for map comparison
+    // Required for map comparison.
     bool operator<(const ArchiveCacheKey &Other) const {
       return std::tie(ArchivePath, MemberName, ArchName) <
              std::tie(Other.ArchivePath, Other.MemberName, Other.ArchName);
     }
   };
 
-  std::map<ArchiveCacheKey, std::unique_ptr<ObjectFile>>
-      ObjectForArchivePathAndArch;
+  /// Parsed object file for path/object/architecture pair, where
+  /// "path" refers to Mach-O universal binary.
+  std::map<ArchiveCacheKey, std::unique_ptr<ObjectFile>> ObjectFileCache;
+
+  /// Helper function to load binary.
+  Expected<object::Binary *> loadOrGetBinary(const std::string &Path);
+
+  /// Helper function to find and get object
----------------
jh7370 wrote:

```suggestion
  /// Helper function to find and get object.
```

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


More information about the llvm-commits mailing list