summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/AttrImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/AttrImpl.cpp')
-rw-r--r--clang/lib/AST/AttrImpl.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/clang/lib/AST/AttrImpl.cpp b/clang/lib/AST/AttrImpl.cpp
index b09ba895c01..7277bbce24b 100644
--- a/clang/lib/AST/AttrImpl.cpp
+++ b/clang/lib/AST/AttrImpl.cpp
@@ -15,14 +15,7 @@
#include "clang/AST/ASTContext.h"
using namespace clang;
-void Attr::Destroy(ASTContext &C) {
- if (Next) {
- Next->Destroy(C);
- Next = 0;
- }
- this->~Attr();
- C.Deallocate((void*)this);
-}
+Attr::~Attr() { }
AttrWithString::AttrWithString(attr::Kind AK, ASTContext &C, llvm::StringRef s)
: Attr(AK) {
@@ -32,11 +25,6 @@ AttrWithString::AttrWithString(attr::Kind AK, ASTContext &C, llvm::StringRef s)
memcpy(const_cast<char*>(Str), s.data(), StrLen);
}
-void AttrWithString::Destroy(ASTContext &C) {
- C.Deallocate(const_cast<char*>(Str));
- Attr::Destroy(C);
-}
-
void AttrWithString::ReplaceString(ASTContext &C, llvm::StringRef newS) {
if (newS.size() > StrLen) {
C.Deallocate(const_cast<char*>(Str));
@@ -60,12 +48,6 @@ NonNullAttr::NonNullAttr(ASTContext &C, unsigned* arg_nums, unsigned size)
memcpy(ArgNums, arg_nums, sizeof(*ArgNums)*size);
}
-void NonNullAttr::Destroy(ASTContext &C) {
- if (ArgNums)
- C.Deallocate(ArgNums);
- Attr::Destroy(C);
-}
-
#define DEF_SIMPLE_ATTR_CLONE(ATTR) \
Attr *ATTR##Attr::clone(ASTContext &C) const { \
return ::new (C) ATTR##Attr; \
OpenPOWER on IntegriCloud