Skip to content

Commit 09093ca

Browse files
committed
[FOLD] use pointer for InstantiatedFromMember
1 parent c304c74 commit 09093ca

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

clang/include/clang/AST/DeclTemplate.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -781,15 +781,11 @@ class RedeclarableTemplateDecl : public TemplateDecl,
781781
EntryType *Entry, void *InsertPos);
782782

783783
struct CommonBase {
784-
CommonBase() : InstantiatedFromMember(nullptr, false) {}
784+
CommonBase() {}
785785

786786
/// The template from which this was most
787787
/// directly instantiated (or null).
788-
///
789-
/// The boolean value indicates whether this template
790-
/// was explicitly specialized.
791-
llvm::PointerIntPair<RedeclarableTemplateDecl*, 1, bool>
792-
InstantiatedFromMember;
788+
RedeclarableTemplateDecl *InstantiatedFromMember = nullptr;
793789

794790
/// If non-null, points to an array of specializations (including
795791
/// partial specializations) known only by their external declaration IDs.
@@ -903,12 +899,12 @@ class RedeclarableTemplateDecl : public TemplateDecl,
903899
/// void X<T>::f(T, U);
904900
/// \endcode
905901
RedeclarableTemplateDecl *getInstantiatedFromMemberTemplate() const {
906-
return getCommonPtr()->InstantiatedFromMember.getPointer();
902+
return getCommonPtr()->InstantiatedFromMember;
907903
}
908904

909905
void setInstantiatedFromMemberTemplate(RedeclarableTemplateDecl *TD) {
910-
assert(!getCommonPtr()->InstantiatedFromMember.getPointer());
911-
getCommonPtr()->InstantiatedFromMember.setPointer(TD);
906+
assert(!getCommonPtr()->InstantiatedFromMember);
907+
getCommonPtr()->InstantiatedFromMember = TD;
912908
}
913909

914910
/// Retrieve the "injected" template arguments that correspond to the

0 commit comments

Comments
 (0)