Prevent alias from pointing to weak aliases.
[oota-llvm.git] / lib / Target / TargetMachine.cpp
index f8a58ec2922c26d627f26ea582ee23fbe3382a33..fe3c870c980a16aebdbf9c635230c270857f08dc 100644 (file)
@@ -129,7 +129,7 @@ TLSModel::Model TargetMachine::getTLSModel(const GlobalValue *GV) const {
   // If GV is an alias then use the aliasee for determining
   // thread-localness.
   if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV))
-    GV = GA->resolveAliasedGlobal(false);
+    GV = GA->getAliasedGlobal();
   const GlobalVariable *Var = cast<GlobalVariable>(GV);
 
   bool isLocal = Var->hasLocalLinkage();