Prevent alias from pointing to weak aliases.
[oota-llvm.git] / lib / Target / PowerPC / PPCFastISel.cpp
index 4753160e0913c3e2f0a73bd5ed7522729060274c..dd45683032ab7cfc5e1d9101eb0a602134df3292 100644 (file)
@@ -1863,7 +1863,7 @@ unsigned PPCFastISel::PPCMaterializeGV(const GlobalValue *GV, MVT VT) {
   if (!GVar) {
     // If GV is an alias, use the aliasee for determining thread-locality.
     if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV))
-      GVar = dyn_cast_or_null<GlobalVariable>(GA->resolveAliasedGlobal(false));
+      GVar = dyn_cast_or_null<GlobalVariable>(GA->getAliasedGlobal());
   }
 
   // FIXME: We don't yet handle the complexity of TLS.