Revert r75610 (and r75620, which was blocking the revert), in the hopes of
unbreaking llvm-gcc (on Darwin).
--- Reverse-merging r75620 into '.':
U include/llvm/Support/Mangler.h
--- Reverse-merging r75610 into '.':
U test/CodeGen/X86/loop-hoist.ll
G include/llvm/Support/Mangler.h
U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
U lib/VMCore/Mangler.cpp
llvm-svn: 75636
diff --git a/llvm/lib/VMCore/Mangler.cpp b/llvm/lib/VMCore/Mangler.cpp
index 10a29db..cec41df 100644
--- a/llvm/lib/VMCore/Mangler.cpp
+++ b/llvm/lib/VMCore/Mangler.cpp
@@ -116,19 +116,12 @@
return Result;
}
-/// getMangledName - Returns the mangled name of V, an LLVM Value,
-/// in the current module. If 'Suffix' is specified, the name ends with the
-/// specified suffix. If 'ForcePrivate' is specified, the label is specified
-/// to have a private label prefix.
-///
-std::string Mangler::getMangledName(const GlobalValue *GV, const char *Suffix,
- bool ForcePrivate) {
+std::string Mangler::getValueName(const GlobalValue *GV, const char *Suffix) {
assert((!isa<Function>(GV) || !cast<Function>(GV)->isIntrinsic()) &&
"Intrinsic functions cannot be mangled by Mangler");
if (GV->hasName())
- return makeNameProper(GV->getName() + Suffix,
- GV->hasPrivateLinkage() | ForcePrivate);
+ return makeNameProper(GV->getName() + Suffix, GV->hasPrivateLinkage());
// Get the ID for the global, assigning a new one if we haven't got one
// already.
@@ -136,8 +129,7 @@
if (ID == 0) ID = NextAnonGlobalID++;
// Must mangle the global into a unique ID.
- return makeNameProper("__unnamed_" + utostr(ID) + Suffix,
- GV->hasPrivateLinkage() | ForcePrivate);
+ return "__unnamed_" + utostr(ID) + Suffix;
}
Mangler::Mangler(Module &M, const char *prefix, const char *privatePrefix)