mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-16 08:08:01 +00:00
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
This commit is contained in:
parent
02a618dc56
commit
6d7c5fa8dc
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user