diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-19 23:13:33 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-19 23:13:33 +0000 |
commit | abd37961d55680e5e946b9e336ce14b4ac56f830 (patch) | |
tree | bc308bdff43b48586c0fdcf1e11aec1fb68247b3 /include/llvm/IR/GlobalAlias.h | |
parent | c2d722efbfd4860dcb7a344be2031ec24cb6691f (diff) | |
download | external_llvm-abd37961d55680e5e946b9e336ce14b4ac56f830.zip external_llvm-abd37961d55680e5e946b9e336ce14b4ac56f830.tar.gz external_llvm-abd37961d55680e5e946b9e336ce14b4ac56f830.tar.bz2 |
Introduce non-const overloads for GlobalAlias::{get,resolve}AliasedGlobal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IR/GlobalAlias.h')
-rw-r--r-- | include/llvm/IR/GlobalAlias.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/IR/GlobalAlias.h b/include/llvm/IR/GlobalAlias.h index 883814a..e09fb6a 100644 --- a/include/llvm/IR/GlobalAlias.h +++ b/include/llvm/IR/GlobalAlias.h @@ -66,14 +66,20 @@ public: } /// getAliasedGlobal() - Aliasee can be either global or bitcast of /// global. This method retrives the global for both aliasee flavours. - const GlobalValue *getAliasedGlobal() const; + GlobalValue *getAliasedGlobal(); + const GlobalValue *getAliasedGlobal() const { + return const_cast<GlobalAlias *>(this)->getAliasedGlobal(); + } /// 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; + GlobalValue *resolveAliasedGlobal(bool stopOnWeak = true); + const GlobalValue *resolveAliasedGlobal(bool stopOnWeak = true) const { + return const_cast<GlobalAlias *>(this)->resolveAliasedGlobal(stopOnWeak); + } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const Value *V) { |