[llvm] [llvm-symbolizer] Recognize AIX big archive (PR #150401)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 00:53:39 PST 2025
================
@@ -216,15 +226,39 @@ class LLVMSymbolizer {
/// Contains parsed binary for each path, or parsing error.
std::map<std::string, CachedBinary, std::less<>> BinaryForPath;
+ /// Store the archive path for the object file.
+ DenseMap<const object::ObjectFile *, std::string> ObjectToArchivePath;
+
/// A list of cached binaries in LRU order.
simple_ilist<CachedBinary> LRUBinaries;
/// 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 ContainerCacheKey {
+ std::string Path;
+ std::string MemberName;
+ std::string ArchName;
+
+ // Required for map comparison.
+ bool operator<(const ContainerCacheKey &Other) const {
+ return std::tie(Path, MemberName, ArchName) <
+ std::tie(Other.Path, Other.MemberName, Other.ArchName);
+ }
+ };
+
+ /// Parsed object file for each path/member/architecture triple.
+ /// Used to cache objects extracted from containers (Mach-O universal
----------------
jh7370 wrote:
I'd add an "e.g." before "Mach-O" in case the same technique is used for similar formats in the future.
https://github.com/llvm/llvm-project/pull/150401
More information about the llvm-commits
mailing list