aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Function.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-26 08:08:38 +0000
committerChris Lattner <sabre@nondot.org>2004-02-26 08:08:38 +0000
commitc230978a82adff3ab9d6ae0426a942e431ce9c5e (patch)
treeda674c657ece115b48edc8be3f18142e3f2acdd4 /include/llvm/Function.h
parentfd343b0bec773c611e468a9e42d991a0ff26d68d (diff)
downloadexternal_llvm-c230978a82adff3ab9d6ae0426a942e431ce9c5e.zip
external_llvm-c230978a82adff3ab9d6ae0426a942e431ce9c5e.tar.gz
external_llvm-c230978a82adff3ab9d6ae0426a942e431ce9c5e.tar.bz2
Annotations are evil. This makes Value not derive from Annotable, which makes
all dynamically allocated LLVM values 4 bytes smaller, eliminate some vtables, and make Value's destructor faster. This makes Function derive from Annotation now because it is the only core LLVM class that still has an annotation stuck onto it: MachineFunction. MachineFunction is obviously horrible and gross (like most other annotations), but will be the subject of refactorings later in the future. Besides many fewer Function objects are dynamically allocated that instructions blocks, constants, types, etc... :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11878 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r--include/llvm/Function.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 4dd791e..e77ddfa 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -21,6 +21,7 @@
#include "llvm/GlobalValue.h"
#include "llvm/BasicBlock.h"
#include "llvm/Argument.h"
+#include "Support/Annotation.h"
namespace llvm {
@@ -44,7 +45,7 @@ template<> struct ilist_traits<Argument>
static iplist<Argument> &getList(Function *F);
};
-class Function : public GlobalValue {
+class Function : public GlobalValue, public Annotable {
public:
typedef iplist<Argument> ArgumentListType;
typedef iplist<BasicBlock> BasicBlockListType;