diff options
Diffstat (limited to 'include/llvm/GlobalAlias.h')
-rw-r--r-- | include/llvm/GlobalAlias.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/include/llvm/GlobalAlias.h b/include/llvm/GlobalAlias.h index f4af5b1..c3d3c38 100644 --- a/include/llvm/GlobalAlias.h +++ b/include/llvm/GlobalAlias.h @@ -47,11 +47,6 @@ public: /// Provide fast operand accessors DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - /// isDeclaration - Is this global variable lacking an initializer? If so, - /// the global variable is defined in some other translation unit, and is thus - /// only a declaration here. - virtual bool isDeclaration() const; - /// removeFromParent - This method unlinks 'this' from the containing module, /// but does not delete it. /// @@ -63,23 +58,23 @@ public: virtual void eraseFromParent(); /// set/getAliasee - These methods retrive and set alias target. - void setAliasee(Constant* GV); - const Constant* getAliasee() const { + void setAliasee(Constant *GV); + const Constant *getAliasee() const { return cast_or_null<Constant>(getOperand(0)); } - Constant* getAliasee() { + Constant *getAliasee() { return cast_or_null<Constant>(getOperand(0)); } /// getAliasedGlobal() - Aliasee can be either global or bitcast of /// global. This method retrives the global for both aliasee flavours. - const GlobalValue* getAliasedGlobal() const; + const GlobalValue *getAliasedGlobal() const; /// resolveAliasedGlobal() - This method tries to ultimately resolve the alias /// by going through the aliasing chain and trying to find the very last /// global. Returns NULL if a cycle was found. If stopOnWeak is false, then /// the whole chain aliasing chain is traversed, otherwise - only strong /// aliases. - const GlobalValue* resolveAliasedGlobal(bool stopOnWeak = true) const; + const GlobalValue *resolveAliasedGlobal(bool stopOnWeak = true) const; // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const GlobalAlias *) { return true; } |