aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-17 18:14:32 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-17 18:14:32 +0000
commitf91d08712514fca6b1e66abf51a13f2d7041bb05 (patch)
tree4ed800bbfca7a5f43d60d8c095fc90971bf8cdc8
parent2ae442a8a0974aee1da389a69857a4b6f2823c1a (diff)
Remove the last virtual member function from the Decl hierarchy,
reducing the size of all declarations by one pointer. For a 64-bit Clang parsing Cocoa.h, this saves ~630k of memory (about 3.5% of ASTContext's memory usage for this header). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125756 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/DeclBase.h2
-rw-r--r--lib/AST/DeclBase.cpp3
2 files changed, 0 insertions, 5 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index c67391653a..6670d9de12 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -270,8 +270,6 @@ protected:
if (Decl::CollectingStats()) add(DK);
}
- virtual ~Decl();
-
public:
/// \brief Source range that this declaration covers.
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 437089a415..be4d82a054 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -288,9 +288,6 @@ void PrettyStackTraceDecl::print(llvm::raw_ostream &OS) const {
// Decl Implementation
//===----------------------------------------------------------------------===//
-// Out-of-line virtual method providing a home for Decl.
-Decl::~Decl() { }
-
bool Decl::isOutOfLine() const {
if (const VarDecl *VD = dyn_cast<VarDecl>(this))
return VD->isOutOfLine();