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
Author: d0k
Date: Wed Aug 30 15:51:50 2017
New Revision: 312186
URL: http://llvm.org/viewvc/llvm-project?rev=312186&view=rev
Log:
[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.
Modified:
cfe/trunk/include/clang/Sema/Sema.h
Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=312186&r1=312185&r2=312186&view=diff
==============================================================================
--- 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:
CXXInvalid
};
- typedef std::pair<CXXRecordDecl*, CXXSpecialMember> SpecialMemberDecl;
+ typedef llvm::PointerIntPair<CXXRecordDecl *, 3, CXXSpecialMember>
+ SpecialMemberDecl;
/// 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
mailing list