Another work around for the 'symbols with different types can have the same
authorChris Lattner <sabre@nondot.org>
Mon, 13 Feb 2006 21:43:26 +0000 (21:43 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 13 Feb 2006 21:43:26 +0000 (21:43 +0000)
name' issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26149 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Mangler.cpp

index f68959abe64fbf5e43427545511ea587e63ca59f..b1a9e3a6ffd27dd19435e1be5f2e4c11148887ac 100644 (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);