[llvm-commits] [llvm] r53387 - /llvm/trunk/lib/Linker/LinkModules.cpp

Chris Lattner sabre at nondot.org
Wed Jul 9 18:09:34 PDT 2008


Author: lattner
Date: Wed Jul  9 20:09:33 2008
New Revision: 53387

URL: http://llvm.org/viewvc/llvm-project?rev=53387&view=rev
Log:
The source and dest of an alias are *not* required to have the same type,
though that would be nice and make sense :).  Patch by Nathan Keynes!

Modified:
    llvm/trunk/lib/Linker/LinkModules.cpp

Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=53387&r1=53386&r2=53387&view=diff

==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Wed Jul  9 20:09:33 2008
@@ -714,9 +714,7 @@
 
       // If types don't agree due to opaque types, try to resolve them.
       if (DGV && DGV->getType() != SGA->getType())
-        if (RecursiveResolveTypes(SGA->getType(), DGV->getType()))
-          return Error(Err, "Alias Collision on '" + SGA->getName()+
-                       "': aliases have different types");
+        RecursiveResolveTypes(SGA->getType(), DGV->getType());
     }
 
     if (!DGV && !SGA->hasInternalLinkage()) {
@@ -724,9 +722,7 @@
 
       // If types don't agree due to opaque types, try to resolve them.
       if (DGV && DGV->getType() != SGA->getType())
-        if (RecursiveResolveTypes(SGA->getType(), DGV->getType()))
-          return Error(Err, "Alias Collision on '" + SGA->getName()+
-                       "': aliases have different types");
+        RecursiveResolveTypes(SGA->getType(), DGV->getType());
     }
 
     if (!DGV && !SGA->hasInternalLinkage()) {
@@ -734,9 +730,7 @@
 
       // If types don't agree due to opaque types, try to resolve them.
       if (DGV && DGV->getType() != SGA->getType())
-        if (RecursiveResolveTypes(SGA->getType(), DGV->getType()))
-          return Error(Err, "Alias Collision on '" + SGA->getName()+
-                       "': aliases have different types");
+        RecursiveResolveTypes(SGA->getType(), DGV->getType());
     }
 
     // No linking to be performed on internal stuff.





More information about the llvm-commits mailing list