[llvm] big archive recognition by the llvm-symbolizer (PR #150401)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 25 02:06:45 PDT 2025
================
@@ -226,6 +238,20 @@ class LLVMSymbolizer {
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
+
+ // 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;
----------------
jh7370 wrote:
Is `std::map` really the right type? Is the iteration order actually important? See https://llvm.org/docs/ProgrammersManual.html#map-like-containers-std-map-densemap-etc.
https://github.com/llvm/llvm-project/pull/150401
More information about the llvm-commits
mailing list