]> granicus.if.org Git - clang/commitdiff
Remove the last virtual member function from the Decl hierarchy,
authorDouglas Gregor <dgregor@apple.com>
Thu, 17 Feb 2011 18:14:32 +0000 (18:14 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 17 Feb 2011 18:14:32 +0000 (18:14 +0000)
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

include/clang/AST/DeclBase.h
lib/AST/DeclBase.cpp

index c67391653a8e8ee03a98d811825e3d45c1049fd5..6670d9de12eb383c556c6b041e9233fb06f44756 100644 (file)
@@ -270,8 +270,6 @@ protected:
     if (Decl::CollectingStats()) add(DK);
   }
 
-  virtual ~Decl();
-  
 public:
 
   /// \brief Source range that this declaration covers.
index 437089a415f26af02a7e51bc3079c949fd9394d1..be4d82a054ee29a822771000956134b8944fda42 100644 (file)
@@ -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();