From ef9c23f2812322ae5c5f3140bfbcf92629d7ff47 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 3 Oct 2001 14:53:21 +0000 Subject: * 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 --- include/llvm/Function.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include/llvm/Function.h') 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 ArgumentListType; typedef ValueHolder 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 -- cgit v1.2.3