From: Duncan Sands Date: Thu, 8 Jan 2009 20:55:49 +0000 (+0000) Subject: Use mayBeOverridden here, in anticipation of the X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=86062afbc49b549a653d38fb03702051f3917df7;p=oota-llvm.git Use mayBeOverridden here, in anticipation of the day when more linkage types will be handled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61944 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Globals.cpp b/lib/VMCore/Globals.cpp index c917dfc3be7..de1b247150e 100644 --- a/lib/VMCore/Globals.cpp +++ b/lib/VMCore/Globals.cpp @@ -252,7 +252,7 @@ const GlobalValue *GlobalAlias::resolveAliasedGlobal(bool stopOnWeak) const { SmallPtrSet Visited; // Check if we need to stop early. - if (stopOnWeak && hasWeakLinkage()) + if (stopOnWeak && mayBeOverridden()) return this; const GlobalValue *GV = getAliasedGlobal(); @@ -260,7 +260,7 @@ const GlobalValue *GlobalAlias::resolveAliasedGlobal(bool stopOnWeak) const { // Iterate over aliasing chain, stopping on weak alias if necessary. while (const GlobalAlias *GA = dyn_cast(GV)) { - if (stopOnWeak && GA->hasWeakLinkage()) + if (stopOnWeak && GA->mayBeOverridden()) break; GV = GA->getAliasedGlobal();