Prevent alias from pointing to weak aliases.
[oota-llvm.git] / lib / Target / PowerPC / PPCISelDAGToDAG.cpp
index 5b09588e0f9dbedb40ca084f54ace550c12386ef..0e75bb45757528d8b7a84a7275d94ac834d7e61f 100644 (file)
@@ -1413,8 +1413,8 @@ SDNode *PPCDAGToDAGISel::Select(SDNode *N) {
     if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(GA)) {
       const GlobalValue *GValue = G->getGlobal();
       const GlobalAlias *GAlias = dyn_cast<GlobalAlias>(GValue);
-      const GlobalValue *RealGValue = GAlias ?
-        GAlias->resolveAliasedGlobal(false) : GValue;
+      const GlobalValue *RealGValue =
+          GAlias ? GAlias->getAliasedGlobal() : GValue;
       const GlobalVariable *GVar = dyn_cast<GlobalVariable>(RealGValue);
       assert((GVar || isa<Function>(RealGValue)) &&
              "Unexpected global value subclass!");