[llvm-commits] [llvm] r61944 - /llvm/trunk/lib/VMCore/Globals.cpp
Duncan Sands
baldrick at free.fr
Thu Jan 8 12:55:50 PST 2009
Author: baldrick
Date: Thu Jan 8 14:55:49 2009
New Revision: 61944
URL: http://llvm.org/viewvc/llvm-project?rev=61944&view=rev
Log:
Use mayBeOverridden here, in anticipation of the
day when more linkage types will be handled.
Modified:
llvm/trunk/lib/VMCore/Globals.cpp
Modified: llvm/trunk/lib/VMCore/Globals.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Globals.cpp?rev=61944&r1=61943&r2=61944&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Globals.cpp (original)
+++ llvm/trunk/lib/VMCore/Globals.cpp Thu Jan 8 14:55:49 2009
@@ -252,7 +252,7 @@
SmallPtrSet<const GlobalValue*, 3> Visited;
// Check if we need to stop early.
- if (stopOnWeak && hasWeakLinkage())
+ if (stopOnWeak && mayBeOverridden())
return this;
const GlobalValue *GV = getAliasedGlobal();
@@ -260,7 +260,7 @@
// Iterate over aliasing chain, stopping on weak alias if necessary.
while (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV)) {
- if (stopOnWeak && GA->hasWeakLinkage())
+ if (stopOnWeak && GA->mayBeOverridden())
break;
GV = GA->getAliasedGlobal();
More information about the llvm-commits
mailing list