[clang] [clang][ssaf] Add EntityLinkage data structure (PR #181718)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 16 11:12:12 PST 2026


================
@@ -23,8 +24,11 @@ namespace clang::ssaf {
 class TUSummary {
   /// Identifies the translation unit.
   BuildNamespace TUNamespace;
+
   EntityIdTable IdTable;
 
+  std::map<EntityId, EntityLinkage> LinkageTable;
----------------
steakhal wrote:

It's good for now, but it looks really wasteful. `std::map` is a noded container, so each node is separately allocated just to house a 2-bit information. Not to talk about the 64bit wide EntityId to make this possible.
I'm pretty sure we could do better than this, but it's also good enough for now.

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


More information about the cfe-commits mailing list