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

name' issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26149 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-02-13 21:43:26 +00:00
parent 40ec5037fa
commit ed1e1e232f

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);