diff options
Diffstat (limited to 'lib/Support/Annotation.cpp')
-rw-r--r-- | lib/Support/Annotation.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Support/Annotation.cpp b/lib/Support/Annotation.cpp index bcd196da44..45fd06f92e 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()) { |