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/GlobalVariable.h | |
parent | da257162968820a7fd77a9df44e3f72090a7f13a (diff) | |
download | external_llvm-ef9c23f2812322ae5c5f3140bfbcf92629d7ff47.zip external_llvm-ef9c23f2812322ae5c5f3140bfbcf92629d7ff47.tar.gz external_llvm-ef9c23f2812322ae5c5f3140bfbcf92629d7ff47.tar.bz2 |
* 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/GlobalVariable.h')
-rw-r--r-- | include/llvm/GlobalVariable.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h index 3ee7f6d..4256ffe 100644 --- a/include/llvm/GlobalVariable.h +++ b/include/llvm/GlobalVariable.h @@ -13,12 +13,12 @@ #ifndef LLVM_GLOBAL_VARIABLE_H #define LLVM_GLOBAL_VARIABLE_H -#include "llvm/User.h" +#include "llvm/GlobalValue.h" class Module; class ConstPoolVal; class PointerType; -class GlobalVariable : public User { +class GlobalVariable : public GlobalValue { Module *Parent; // The module that contains this method friend class ValueHolder<GlobalVariable, Module, Module>; @@ -30,11 +30,6 @@ public: const string &Name = ""); ~GlobalVariable() {} - // getType - Global variables are always pointers - inline const PointerType *getType() const { - return (const PointerType*)User::getType(); - } - // Specialize setName to handle symbol table majik... virtual void setName(const string &name, SymbolTable *ST = 0); @@ -63,7 +58,7 @@ public: // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const GlobalVariable *) { return true; } static inline bool classof(const Value *V) { - return V->getValueType() == Value::GlobalVal; + return V->getValueType() == Value::GlobalVariableVal; } }; |