[PATCH] D52268: [AST] Squeeze some bits in LinkageComputer
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 19 09:01:36 PDT 2018
erichkeane added a comment.
Does this still work with 32 bit hosts? Does PointerIntPair have 3 bits in that case? Is the alignof static_assert valid in that case?
================
Comment at: lib/AST/Linkage.h:40
+ enum { NumLVComputationKindBits = 3 };
+
----------------
I'm not sure how often this ever gets modified, but it is a touch scary to me that we've already maxed out the size of this struct.
================
Comment at: lib/AST/Linkage.h:89
llvm::SmallDenseMap<QueryType, LinkageInfo, 8> CachedLinkageInfo;
+ static_assert(alignof(NamedDecl) >= 8,
+ "LinkageComputer assumes that NamedDecl is aligned to >= 8!");
----------------
Is this not guaranteed by the static-assert in pointerintpair?
Repository:
rC Clang
https://reviews.llvm.org/D52268
More information about the cfe-commits
mailing list