1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Revert "Address review comments"

This reverts commit r232540.  This was committed accidently.

llvm-svn: 232541
This commit is contained in:
David Majnemer 2015-03-17 20:40:21 +00:00
parent 015e28c0bc
commit ae310ff40b
3 changed files with 13 additions and 12 deletions

View File

@ -52,11 +52,9 @@ public:
/// If the global variable doesn't have a name, this fills in a unique name /// If the global variable doesn't have a name, this fills in a unique name
/// for the global. /// for the global.
void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
bool CannotUsePrivateLabel, bool CannotUsePrivateLabel) const;
bool ForceNonPrivate = false) const;
void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV, void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
bool CannotUsePrivateLabel, bool CannotUsePrivateLabel) const;
bool ForceNonPrivate = false) const;
/// Print the appropriate prefix and the specified name as the global variable /// Print the appropriate prefix and the specified name as the global variable
/// name. GVName must not be empty. /// name. GVName must not be empty.

View File

@ -960,8 +960,13 @@ void TargetLoweringObjectFileCOFF::getNameWithPrefix(
((isa<Function>(GV) && TM.getFunctionSections()) || ((isa<Function>(GV) && TM.getFunctionSections()) ||
(isa<GlobalVariable>(GV) && TM.getDataSections()))) { (isa<GlobalVariable>(GV) && TM.getDataSections()))) {
SmallString<256> Tmp; SmallString<256> Tmp;
Mang.getNameWithPrefix(Tmp, GV, CannotUsePrivateLabel, /*ForceNonPrivate=*/true); Mang.getNameWithPrefix(Tmp, GV, /*CannotUsePrivateLabel=*/false);
OutName.append(Tmp.begin(), Tmp.end()); if (Tmp.startswith(".L"))
OutName.append(Tmp.begin() + 2, Tmp.end());
else if (Tmp.startswith("L"))
OutName.append(Tmp.begin() + 1, Tmp.end());
else
OutName.append(Tmp.begin(), Tmp.end());
return; return;
} }
Mang.getNameWithPrefix(OutName, GV, CannotUsePrivateLabel); Mang.getNameWithPrefix(OutName, GV, CannotUsePrivateLabel);

View File

@ -91,10 +91,9 @@ static void addByteCountSuffix(raw_ostream &OS, const Function *F,
} }
void Mangler::getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, void Mangler::getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
bool CannotUsePrivateLabel, bool CannotUsePrivateLabel) const {
bool ForceNonPrivate) const {
ManglerPrefixTy PrefixTy = Mangler::Default; ManglerPrefixTy PrefixTy = Mangler::Default;
if (GV->hasPrivateLinkage() && !ForceNonPrivate) { if (GV->hasPrivateLinkage()) {
if (CannotUsePrivateLabel) if (CannotUsePrivateLabel)
PrefixTy = Mangler::LinkerPrivate; PrefixTy = Mangler::LinkerPrivate;
else else
@ -153,8 +152,7 @@ void Mangler::getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
void Mangler::getNameWithPrefix(SmallVectorImpl<char> &OutName, void Mangler::getNameWithPrefix(SmallVectorImpl<char> &OutName,
const GlobalValue *GV, const GlobalValue *GV,
bool CannotUsePrivateLabel, bool CannotUsePrivateLabel) const {
bool ForceNonPrivate) const {
raw_svector_ostream OS(OutName); raw_svector_ostream OS(OutName);
getNameWithPrefix(OS, GV, CannotUsePrivateLabel, ForceNonPrivate); getNameWithPrefix(OS, GV, CannotUsePrivateLabel);
} }