Revert "Prevent alias from pointing to weak aliases."
[oota-llvm.git] / lib / Target / XCore / XCoreISelLowering.cpp
index 1b74013ac18bbf0f2e2b7415dc008b66828cd101..079e886457bcf0059abf12fa24df97b110e5ee19 100644 (file)
@@ -277,7 +277,7 @@ getGlobalAddressWrapper(SDValue GA, const GlobalValue *GV,
   const GlobalValue *UnderlyingGV = GV;
   // If GV is an alias then use the aliasee to determine the wrapper type
   if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV))
-    UnderlyingGV = GA->getAliasedGlobal();
+    UnderlyingGV = GA->resolveAliasedGlobal();
   if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(UnderlyingGV)) {
     if (  ( GVar->isConstant() &&
             UnderlyingGV->isLocalLinkage(GV->getLinkage()) )