aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-13 21:43:26 +0000
committerChris Lattner <sabre@nondot.org>2006-02-13 21:43:26 +0000
commited1e1e232f90979d9501fd2feaf4c6ab6882fafd (patch)
tree18be90c0f7c6e3b057caa88cfb7df44232933e03 /lib/VMCore
parent40ec5037fa11b33e21bee07dfe26d9c185201df7 (diff)
downloadexternal_llvm-ed1e1e232f90979d9501fd2feaf4c6ab6882fafd.zip
external_llvm-ed1e1e232f90979d9501fd2feaf4c6ab6882fafd.tar.gz
external_llvm-ed1e1e232f90979d9501fd2feaf4c6ab6882fafd.tar.bz2
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Mangler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp
index f68959a..b1a9e3a 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);