simplify this logic now that GlobalAlias::isDeclaration is fixed.
authorChris Lattner <sabre@nondot.org>
Thu, 14 Jul 2011 20:23:05 +0000 (20:23 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 14 Jul 2011 20:23:05 +0000 (20:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135183 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Linker/LinkModules.cpp

index d77062772e37bb7d899f0ce1455f93f17b392321..f566c079e695f1f1ab4906fc6e24f8b627fac78d 100644 (file)
@@ -437,10 +437,8 @@ bool ModuleLinker::getLinkageResult(GlobalValue *Dest, const GlobalValue *Src,
   assert(!Src->hasLocalLinkage() &&
          "If Src has internal linkage, Dest shouldn't be set!");
   
-  // FIXME: GlobalAlias::isDeclaration is broken, should always be
-  // false.
-  bool SrcIsDeclaration = Src->isDeclaration() && !isa<GlobalAlias>(Src);
-  bool DestIsDeclaration = Dest->isDeclaration() && !isa<GlobalAlias>(Dest);
+  bool SrcIsDeclaration = Src->isDeclaration();
+  bool DestIsDeclaration = Dest->isDeclaration();
   
   if (SrcIsDeclaration) {
     // If Src is external or if both Src & Dest are external..  Just link the