mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
Revert "Prevent alias from pointing to weak aliases."
This reverts commit r204781. I will follow up to with msan folks to see what is what they were trying to do with aliases to weak aliases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204784 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -64,15 +64,23 @@ public:
|
||||
Constant *getAliasee() {
|
||||
return getOperand(0);
|
||||
}
|
||||
|
||||
/// 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.
|
||||
/// getAliasedGlobal() - Aliasee can be either global or bitcast of
|
||||
/// global. This method retrives the global for both aliasee flavours.
|
||||
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.
|
||||
GlobalValue *resolveAliasedGlobal(bool stopOnWeak = true);
|
||||
const GlobalValue *resolveAliasedGlobal(bool stopOnWeak = true) const {
|
||||
return const_cast<GlobalAlias *>(this)->resolveAliasedGlobal(stopOnWeak);
|
||||
}
|
||||
|
||||
static bool isValidLinkage(LinkageTypes L) {
|
||||
return isExternalLinkage(L) || isLocalLinkage(L) ||
|
||||
isWeakLinkage(L) || isLinkOnceLinkage(L);
|
||||
|
Reference in New Issue
Block a user