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).

llvm-svn: 125756
This commit is contained in:
Douglas Gregor 2011-02-17 18:14:32 +00:00
parent b494173c93
commit e5de7013c7
2 changed files with 0 additions and 5 deletions

View File

@ -270,8 +270,6 @@ protected:
if (Decl::CollectingStats()) add(DK); if (Decl::CollectingStats()) add(DK);
} }
virtual ~Decl();
public: public:
/// \brief Source range that this declaration covers. /// \brief Source range that this declaration covers.

View File

@ -288,9 +288,6 @@ void PrettyStackTraceDecl::print(llvm::raw_ostream &OS) const {
// Decl Implementation // Decl Implementation
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Out-of-line virtual method providing a home for Decl.
Decl::~Decl() { }
bool Decl::isOutOfLine() const { bool Decl::isOutOfLine() const {
if (const VarDecl *VD = dyn_cast<VarDecl>(this)) if (const VarDecl *VD = dyn_cast<VarDecl>(this))
return VD->isOutOfLine(); return VD->isOutOfLine();