Annotation *Next; // The next annotation in the linked list
public:
inline Annotation(AnnotationID id) : ID(id), Next(0) {}
- virtual ~Annotation() {} // Designed to be subclassed
+ virtual ~Annotation(); // Designed to be subclassed
// getID - Return the unique ID# of this annotation
inline AnnotationID getID() const { return ID; }
void operator=(const Annotable &); // Do not implement
public:
Annotable() : AnnotationList(0) {}
- virtual ~Annotable() { // Virtual because it's designed to be subclassed...
- Annotation *A = AnnotationList;
- while (A) {
- Annotation *Next = A->getNext();
- delete A;
- A = Next;
- }
- }
+ virtual ~Annotable(); // Virtual because it's designed to be subclassed...
// getAnnotation - Search the list for annotations of the specified ID. The
// pointer returned is either null (if no annotations of the specified ID
class AbstractTypeUser {
protected:
- virtual ~AbstractTypeUser() {} // Derive from me
+ virtual ~AbstractTypeUser(); // Derive from me
public:
/// refineAbstractType - The callback method invoked when an abstract type is
Annotation *Next; // The next annotation in the linked list
public:
inline Annotation(AnnotationID id) : ID(id), Next(0) {}
- virtual ~Annotation() {} // Designed to be subclassed
+ virtual ~Annotation(); // Designed to be subclassed
// getID - Return the unique ID# of this annotation
inline AnnotationID getID() const { return ID; }
void operator=(const Annotable &); // Do not implement
public:
Annotable() : AnnotationList(0) {}
- virtual ~Annotable() { // Virtual because it's designed to be subclassed...
- Annotation *A = AnnotationList;
- while (A) {
- Annotation *Next = A->getNext();
- delete A;
- A = Next;
- }
- }
+ virtual ~Annotable(); // Virtual because it's designed to be subclassed...
// getAnnotation - Search the list for annotations of the specified ID. The
// pointer returned is either null (if no annotations of the specified ID
#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
}
}
-
AnnotationID AnnotationManager::getID(const std::string &Name) { // Name -> ID
IDMapType::iterator I = getIDMap().find(Name);
if (I == getIDMap().end()) {
//
//#define DEBUG_MERGE_TYPES 1
+AbstractTypeUser::~AbstractTypeUser() {}
//===----------------------------------------------------------------------===//
// Type Class Implementation