diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-26 07:24:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-26 07:24:18 +0000 |
commit | 1cd4c7294c9873d7208aab5227bc27cdf8011b2e (patch) | |
tree | 61f5ebd3676781ad53c4743379c2aed6ddfb62c4 /lib | |
parent | f2dbf50efa2690396e5e46c2a1a2ca80f4c701e9 (diff) | |
download | external_llvm-1cd4c7294c9873d7208aab5227bc27cdf8011b2e.zip external_llvm-1cd4c7294c9873d7208aab5227bc27cdf8011b2e.tar.gz external_llvm-1cd4c7294c9873d7208aab5227bc27cdf8011b2e.tar.bz2 |
Make sure that at least one virtual method is defined in a .cpp file to avoid
having the compiler emit RTTI and vtables to EVERY translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/Annotation.cpp | 13 | ||||
-rw-r--r-- | lib/VMCore/Type.cpp | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/Support/Annotation.cpp b/lib/Support/Annotation.cpp index bcd196d..45fd06f 100644 --- a/lib/Support/Annotation.cpp +++ b/lib/Support/Annotation.cpp @@ -15,6 +15,18 @@ #include "Support/Annotation.h" using namespace llvm; +Annotation::~Annotation() {} // Designed to be subclassed + +Annotable::~Annotable() { // Virtual because it's designed to be subclassed... + Annotation *A = AnnotationList; + while (A) { + Annotation *Next = A->getNext(); + delete A; + A = Next; + } +} + + typedef std::map<const std::string, unsigned> IDMapType; static unsigned IDCounter = 0; // Unique ID counter @@ -41,7 +53,6 @@ static void eraseFromFactMap(unsigned ID) { } } - AnnotationID AnnotationManager::getID(const std::string &Name) { // Name -> ID IDMapType::iterator I = getIDMap().find(Name); if (I == getIDMap().end()) { diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index c863e52..1d265e1 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -26,6 +26,7 @@ using namespace llvm; // //#define DEBUG_MERGE_TYPES 1 +AbstractTypeUser::~AbstractTypeUser() {} //===----------------------------------------------------------------------===// // Type Class Implementation |