aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-13 23:20:38 +0000
committerChris Lattner <sabre@nondot.org>2009-07-13 23:20:38 +0000
commitec9aa7eb95fcc10e06cdaffea28f50654307755d (patch)
tree51f7fdd072bf4d0226a7ec1cbf90612890f3d244
parent099c28e44622004fe278af697257eff8e58e8ada (diff)
the mangler should put suffixes on unnamed global's mangled names as well
if present. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75547 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Mangler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp
index 50724f4e42..948bb36a65 100644
--- a/lib/VMCore/Mangler.cpp
+++ b/lib/VMCore/Mangler.cpp
@@ -163,7 +163,7 @@ std::string Mangler::getValueName(const GlobalValue *GV, const char *Suffix) {
Name = GV->getNameStart(); // Is an intrinsic function
} else if (!GV->hasName()) {
// Must mangle the global into a unique ID.
- Name = "__unnamed_" + utostr(Count++);
+ Name = "__unnamed_" + utostr(Count++) + Suffix;
} else {
if (GV->hasPrivateLinkage())
Name = makeNameProper(GV->getName() + Suffix, Prefix, PrivatePrefix);