aboutsummaryrefslogtreecommitdiff
path: root/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-10 01:09:33 +0000
committerChris Lattner <sabre@nondot.org>2008-07-10 01:09:33 +0000
commit5ed2ba26680f06846e7602ce65432b0a723b1273 (patch)
treeb6793d3b6d57e470532dfd01d2217a8446cdfd19 /lib/Linker/LinkModules.cpp
parent331e2bd942f395f3476f2b0c773e551c489a7bf1 (diff)
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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker/LinkModules.cpp')
-rw-r--r--lib/Linker/LinkModules.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index cd18bf4aa1..ea7769a115 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -714,9 +714,7 @@ static bool LinkAlias(Module *Dest, const Module *Src,
// 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 @@ static bool LinkAlias(Module *Dest, const Module *Src,
// 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 @@ static bool LinkAlias(Module *Dest, const Module *Src,
// 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.