diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-03 14:53:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-03 14:53:21 +0000 |
commit | ef9c23f2812322ae5c5f3140bfbcf92629d7ff47 (patch) | |
tree | c87db095661379f13a39bf1dee52af9ded6a23a3 /include/llvm/Function.h | |
parent | da257162968820a7fd77a9df44e3f72090a7f13a (diff) |
* Both Method & GlobalVariable now subclass GlobalValue
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r-- | include/llvm/Function.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 227ab53cd0..d7c35b3c04 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -13,6 +13,7 @@ #include "llvm/SymTabValue.h" #include "llvm/BasicBlock.h" +#include "llvm/GlobalValue.h" class Instruction; class BasicBlock; @@ -20,7 +21,7 @@ class MethodArgument; class MethodType; class Module; -class Method : public Value, public SymTabValue { +class Method : public GlobalValue, public SymTabValue { public: typedef ValueHolder<MethodArgument, Method, Method> ArgumentListType; typedef ValueHolder<BasicBlock , Method, Method> BasicBlocksType; @@ -49,10 +50,8 @@ public: // Specialize setName to handle symbol table majik... virtual void setName(const string &name, SymbolTable *ST = 0); - const Type *getReturnType() const; - const MethodType *getType() const { - return (const MethodType*)Value::getType(); - } + const Type *getReturnType() const; // Return the return type of method + const MethodType *getMethodType() const; // Return the MethodType for me // Is the body of this method unknown? (the basic block list is empty if so) // this is true for external methods, defined as forward "declare"ations |