diff options
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 |