aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclTemplate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/DeclTemplate.cpp')
-rw-r--r--lib/AST/DeclTemplate.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp
index 7b44b4681e..6aa6ec5869 100644
--- a/lib/AST/DeclTemplate.cpp
+++ b/lib/AST/DeclTemplate.cpp
@@ -107,18 +107,6 @@ FunctionTemplateDecl *FunctionTemplateDecl::Create(ASTContext &C,
return new (C) FunctionTemplateDecl(DC, L, Name, Params, Decl);
}
-void FunctionTemplateDecl::Destroy(ASTContext &C) {
- if (Common *CommonPtr = CommonOrPrev.dyn_cast<Common*>()) {
- for (llvm::FoldingSet<FunctionTemplateSpecializationInfo>::iterator
- Spec = CommonPtr->Specializations.begin(),
- SpecEnd = CommonPtr->Specializations.end();
- Spec != SpecEnd; ++Spec)
- C.Deallocate(&*Spec);
- }
-
- Decl::Destroy(C);
-}
-
FunctionDecl *
FunctionTemplateDecl::findSpecialization(const TemplateArgument *Args,
unsigned NumArgs, void *&InsertPos) {
@@ -177,10 +165,6 @@ ClassTemplateDecl *ClassTemplateDecl::Create(ASTContext &C,
return New;
}
-void ClassTemplateDecl::Destroy(ASTContext& C) {
- Decl::Destroy(C);
-}
-
ClassTemplateSpecializationDecl *
ClassTemplateDecl::findSpecialization(const TemplateArgument *Args,
unsigned NumArgs, void *&InsertPos) {
@@ -478,13 +462,6 @@ StructuredArguments.setPointer(NewArgs);
StructuredArguments.setInt(0); // Doesn't own the pointer.
}
-void TemplateArgumentList::Destroy(ASTContext &C) {
- if (FlatArguments.getInt())
- C.Deallocate((void*)FlatArguments.getPointer());
- if (StructuredArguments.getInt())
- C.Deallocate((void*)StructuredArguments.getPointer());
-}
-
TemplateArgumentList::~TemplateArgumentList() {}
//===----------------------------------------------------------------------===//
@@ -534,16 +511,6 @@ ClassTemplateSpecializationDecl::Create(ASTContext &Context, EmptyShell Empty) {
new (Context)ClassTemplateSpecializationDecl(ClassTemplateSpecialization);
}
-void ClassTemplateSpecializationDecl::Destroy(ASTContext &C) {
- delete ExplicitInfo;
-
- if (SpecializedPartialSpecialization *PartialSpec
- = SpecializedTemplate.dyn_cast<SpecializedPartialSpecialization*>())
- C.Deallocate(PartialSpec);
-
- CXXRecordDecl::Destroy(C);
-}
-
void
ClassTemplateSpecializationDecl::getNameForDiagnostic(std::string &S,
const PrintingPolicy &Policy,