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 /include/llvm | |
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 'include/llvm')
-rw-r--r-- | include/llvm/AbstractTypeUser.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/Annotation.h | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/include/llvm/AbstractTypeUser.h b/include/llvm/AbstractTypeUser.h index d211165..f039eb8 100644 --- a/include/llvm/AbstractTypeUser.h +++ b/include/llvm/AbstractTypeUser.h @@ -44,7 +44,7 @@ class DerivedType; class AbstractTypeUser { protected: - virtual ~AbstractTypeUser() {} // Derive from me + virtual ~AbstractTypeUser(); // Derive from me public: /// refineAbstractType - The callback method invoked when an abstract type is diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h index cee7ab7..9bd442a 100644 --- a/include/llvm/Support/Annotation.h +++ b/include/llvm/Support/Annotation.h @@ -68,7 +68,7 @@ class Annotation { 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; } @@ -95,14 +95,7 @@ class Annotable { 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 |