diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2017-02-14 05:37:36 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2017-02-14 05:37:36 +0000 |
commit | 0b0a12c5693701cc54458d3c3981850547a9840e (patch) | |
tree | 7158c754c5a8dd3c372622ef914365b61ffcb462 /include/clang/AST/DeclTemplate.h | |
parent | c09a8490d3f68ebf6a348e8f410bfc8338e1632f (diff) |
Add a destruct-on-exit function to ASTContext.
It looks like the only use of AddDeallocation is to indirectly call the
destructors of objects. In one case I found
(TypeAliasTemplateDecl::Common), the destructor is a nop, so registering
it to run later seems pointless.
All of the other *::Common types have non-trivial dtors, so deleting the
useless AddDeallocation felt somewhat fragile. Happy to kill it + turn
the is_trivial_dtor check into a static_assert if people think that'd be
better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295029 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/DeclTemplate.h')
-rw-r--r-- | include/clang/AST/DeclTemplate.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h index 6f81fcb4ad..e83ec3cfcf 100644 --- a/include/clang/AST/DeclTemplate.h +++ b/include/clang/AST/DeclTemplate.h @@ -937,8 +937,6 @@ SpecEntryTraits<FunctionTemplateSpecializationInfo> { /// Declaration of a template function. class FunctionTemplateDecl : public RedeclarableTemplateDecl { - static void DeallocateCommon(void *Ptr); - protected: /// \brief Data that is common to all of the declarations of a given /// function template. @@ -2035,8 +2033,6 @@ public: /// Declaration of a class template. class ClassTemplateDecl : public RedeclarableTemplateDecl { - static void DeallocateCommon(void *Ptr); - protected: /// \brief Data that is common to all of the declarations of a given /// class template. @@ -2330,8 +2326,6 @@ public: /// template \<typename T> using V = std::map<T*, int, MyCompare<T>>; /// \endcode class TypeAliasTemplateDecl : public RedeclarableTemplateDecl { - static void DeallocateCommon(void *Ptr); - protected: typedef CommonBase Common; @@ -2856,8 +2850,6 @@ public: /// Declaration of a variable template. class VarTemplateDecl : public RedeclarableTemplateDecl { - static void DeallocateCommon(void *Ptr); - protected: /// \brief Data that is common to all of the declarations of a given /// variable template. |