bail out sooner if we have two concrete but different types.
authorChris Lattner <sabre@nondot.org>
Mon, 16 Jun 2008 20:03:01 +0000 (20:03 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 16 Jun 2008 20:03:01 +0000 (20:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52351 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Linker/LinkModules.cpp

index 43721e6237c24379c83d474c9f6f04f5e6abc88f..0d521c086e2849ae7ff5211b1046e056a21727a7 100644 (file)
@@ -93,6 +93,10 @@ static bool RecursiveResolveTypesI(const PATypeHolder &DestTy,
   // type.  For example, we cannot resolve an int to a float.
   if (DestTyT->getTypeID() != SrcTyT->getTypeID()) return true;
 
+  // If neither type is abstract, then they really are just different types.
+  if (!DestTyT->isAbstract() && !SrcTyT->isAbstract())
+    return true;
+  
   // Otherwise, resolve the used type used by this derived type...
   switch (DestTyT->getTypeID()) {
   default: