Another work around for the 'symbols with different types can have the same

name' issue.

llvm-svn: 26149
This commit is contained in:
Chris Lattner 2006-02-13 21:43:26 +00:00
parent a438ef0ee7
commit eea0f0198e
1 changed files with 4 additions and 0 deletions

View File

@ -161,6 +161,10 @@ void Mangler::InsertName(GlobalValue *GV,
if (GV->hasExternalLinkage() && !ExistingValue->hasExternalLinkage()) {
MangledGlobals.insert(ExistingValue);
ExistingValue = GV;
} else if (GV->hasExternalLinkage() && ExistingValue->hasExternalLinkage()&&
GV->isExternal() && ExistingValue->isExternal()) {
// If the two globals both have external inkage, and are both external,
// don't mangle either of them, we just have some silly type mismatch.
} else {
// Otherwise, mangle GV
MangledGlobals.insert(GV);