mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-02 23:26:31 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -116,19 +116,12 @@ std::string Mangler::makeNameProper(const std::string &X,
|
||||
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 @@ std::string Mangler::getMangledName(const GlobalValue *GV, const char *Suffix,
|
||||
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)
|
||||
|
Reference in New Issue
Block a user