r312186 - [Sema] Make SpecialMemberDecl a PointerIntPair so we can stash it in a SmallPtrSet.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 30 15:51:50 PDT 2017
Date: Wed Aug 30 15:51:50 2017
New Revision: 312186
[Sema] Make SpecialMemberDecl a PointerIntPair so we can stash it in a SmallPtrSet.
We have enough spare bits in the alignment of CXXRecordDecl. No
functionality change intended.
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Wed Aug 30 15:51:50 2017
@@ -1121,12 +1121,13 @@ public:
- typedef std::pair<CXXRecordDecl*, CXXSpecialMember> SpecialMemberDecl;
+ typedef llvm::PointerIntPair<CXXRecordDecl *, 3, CXXSpecialMember>
/// The C++ special members which we are currently in the process of
/// declaring. If this process recursively triggers the declaration of the
/// same special member, we should act as if it is not yet declared.
- llvm::SmallSet<SpecialMemberDecl, 4> SpecialMembersBeingDeclared;
+ llvm::SmallPtrSet<SpecialMemberDecl, 4> SpecialMembersBeingDeclared;
/// The function definitions which were renamed as part of typo-correction
/// to match their respective declarations. We want to keep track of them
More information about the cfe-commits