[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 8 06:35:07 PDT 2024
================
@@ -268,17 +268,34 @@ class alignas(8) Decl {
/// }
/// void A::f(); // SemanticDC == namespace 'A'
/// // LexicalDC == global namespace
- llvm::PointerUnion<DeclContext*, MultipleDC*> DeclCtx;
+ llvm::PointerIntPair<
----------------
erichkeane wrote:
I don't think it ends up being 'manual bit twiddling' so much as 3 values in an enum, and I also found the `getPointer().getPointer()` pretty mind-bending, but at least it is somewhat well hidden in stuff we won't touch for a while, so I won't insist.
https://github.com/llvm/llvm-project/pull/87361
More information about the cfe-commits
mailing list