diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2007-04-25 14:27:10 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2007-04-25 14:27:10 +0000 |
commit | 8b0a8c84da2030ee8f4440d5b60a8033de691222 (patch) | |
tree | 7b780ed0cf12403faeac0e65fb16bca29fda5dbf /include/llvm/GlobalValue.h | |
parent | 24a3cc4c83e5edb25fadf7b8979a26b4451795c6 (diff) | |
download | llvm-8b0a8c84da2030ee8f4440d5b60a8033de691222.tar.gz llvm-8b0a8c84da2030ee8f4440d5b60a8033de691222.tar.bz2 llvm-8b0a8c84da2030ee8f4440d5b60a8033de691222.tar.xz |
Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36435 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/GlobalValue.h')
-rw-r--r-- | include/llvm/GlobalValue.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index a20c058004..317aa486a4 100644 --- a/include/llvm/GlobalValue.h +++ b/include/llvm/GlobalValue.h @@ -121,6 +121,16 @@ public: /// value is outside of the current translation unit... virtual bool isDeclaration() const = 0; + /// removeFromParent - This method unlinks 'this' from the containing module, + /// but does not delete it. + /// + virtual void removeFromParent() = 0; + + /// eraseFromParent - This method unlinks 'this' from the containing module + /// and deletes it. + /// + virtual void eraseFromParent() = 0; + /// getParent - Get the module that this global value is contained inside /// of... inline Module *getParent() { return Parent; } @@ -136,7 +146,8 @@ public: static inline bool classof(const GlobalValue *) { return true; } static inline bool classof(const Value *V) { return V->getValueID() == Value::FunctionVal || - V->getValueID() == Value::GlobalVariableVal; + V->getValueID() == Value::GlobalVariableVal || + V->getValueID() == Value::GlobalAliasVal; } }; |