summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit683ed3d94ed834738f1f3fe20740c51e97aef062 (patch)
treec3d9645a90c4f3a61669b826118a021fc0c68ad3 /llvm/lib
parent71b73984630d2750e1885848163b4b90a68898cb (diff)
downloadbcm5719-llvm-683ed3d94ed834738f1f3fe20740c51e97aef062.tar.gz
bcm5719-llvm-683ed3d94ed834738f1f3fe20740c51e97aef062.zip
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! llvm-svn: 53387
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index cd18bf4aa16..ea7769a1159 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud