[llvm-commits] CVS: llvm/lib/Support/Annotation.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Feb 26 01:26:21 PST 2004
Changes in directory llvm/lib/Support:
Annotation.cpp updated: 1.13 -> 1.14
---
Log message:
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.
---
Diffs of the changes: (+12 -1)
Index: llvm/lib/Support/Annotation.cpp
diff -u llvm/lib/Support/Annotation.cpp:1.13 llvm/lib/Support/Annotation.cpp:1.14
--- llvm/lib/Support/Annotation.cpp:1.13 Sun Dec 14 15:35:53 2003
+++ llvm/lib/Support/Annotation.cpp Thu Feb 26 01:23:57 2004
@@ -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
@@ -40,7 +52,6 @@
TheFactMap = 0;
}
}
-
AnnotationID AnnotationManager::getID(const std::string &Name) { // Name -> ID
IDMapType::iterator I = getIDMap().find(Name);
More information about the llvm-commits
mailing list