diff options
-rw-r--r-- | lib/VMCore/Mangler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index f68959abe6..b1a9e3a6ff 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -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); |