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
This commit is contained in:
Chris Lattner 2009-07-13 23:20:38 +00:00
parent 099c28e446
commit ec9aa7eb95

View File

@ -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);