From ed1e1e232f90979d9501fd2feaf4c6ab6882fafd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 13 Feb 2006 21:43:26 +0000 Subject: [PATCH] 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 --- lib/VMCore/Mangler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index f68959abe64..b1a9e3a6ffd 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);