]> granicus.if.org Git - clang/commitdiff
[Sema] Make SpecialMemberDecl a PointerIntPair so we can stash it in a SmallPtrSet.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 30 Aug 2017 22:51:50 +0000 (22:51 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 30 Aug 2017 22:51:50 +0000 (22:51 +0000)
We have enough spare bits in the alignment of CXXRecordDecl. No
functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312186 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/Sema.h

index 70ee29942383e8e53efa38f560ef76f488387161..0ba761573d7f59cbd58d7f09408ec203d6dd6be4 100644 (file)
@@ -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