From ec9aa7eb95fcc10e06cdaffea28f50654307755d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 13 Jul 2009 23:20:38 +0000 Subject: [PATCH] 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 --- lib/VMCore/Mangler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index 50724f4e424..948bb36a657 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);