[llvm] r232541 - Revert "Address review comments"
David Majnemer
david.majnemer at gmail.com
Tue Mar 17 13:40:21 PDT 2015
Author: majnemer
Date: Tue Mar 17 15:40:21 2015
New Revision: 232541
URL: http://llvm.org/viewvc/llvm-project?rev=232541&view=rev
Log:
Revert "Address review comments"
This reverts commit r232540. This was committed accidently.
Modified:
llvm/trunk/include/llvm/IR/Mangler.h
llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/trunk/lib/IR/Mangler.cpp
Modified: llvm/trunk/include/llvm/IR/Mangler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Mangler.h?rev=232541&r1=232540&r2=232541&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Mangler.h (original)
+++ llvm/trunk/include/llvm/IR/Mangler.h Tue Mar 17 15:40:21 2015
@@ -52,11 +52,9 @@ public:
/// If the global variable doesn't have a name, this fills in a unique name
/// for the global.
void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
- bool CannotUsePrivateLabel,
- bool ForceNonPrivate = false) const;
+ bool CannotUsePrivateLabel) const;
void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
- bool CannotUsePrivateLabel,
- bool ForceNonPrivate = false) const;
+ bool CannotUsePrivateLabel) const;
/// Print the appropriate prefix and the specified name as the global variable
/// name. GVName must not be empty.
Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=232541&r1=232540&r2=232541&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Tue Mar 17 15:40:21 2015
@@ -960,8 +960,13 @@ void TargetLoweringObjectFileCOFF::getNa
((isa<Function>(GV) && TM.getFunctionSections()) ||
(isa<GlobalVariable>(GV) && TM.getDataSections()))) {
SmallString<256> Tmp;
- Mang.getNameWithPrefix(Tmp, GV, CannotUsePrivateLabel, /*ForceNonPrivate=*/true);
- OutName.append(Tmp.begin(), Tmp.end());
+ Mang.getNameWithPrefix(Tmp, GV, /*CannotUsePrivateLabel=*/false);
+ 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;
}
Mang.getNameWithPrefix(OutName, GV, CannotUsePrivateLabel);
Modified: llvm/trunk/lib/IR/Mangler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Mangler.cpp?rev=232541&r1=232540&r2=232541&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Mangler.cpp (original)
+++ llvm/trunk/lib/IR/Mangler.cpp Tue Mar 17 15:40:21 2015
@@ -91,10 +91,9 @@ static void addByteCountSuffix(raw_ostre
}
void Mangler::getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
- bool CannotUsePrivateLabel,
- bool ForceNonPrivate) const {
+ bool CannotUsePrivateLabel) const {
ManglerPrefixTy PrefixTy = Mangler::Default;
- if (GV->hasPrivateLinkage() && !ForceNonPrivate) {
+ if (GV->hasPrivateLinkage()) {
if (CannotUsePrivateLabel)
PrefixTy = Mangler::LinkerPrivate;
else
@@ -153,8 +152,7 @@ void Mangler::getNameWithPrefix(raw_ostr
void Mangler::getNameWithPrefix(SmallVectorImpl<char> &OutName,
const GlobalValue *GV,
- bool CannotUsePrivateLabel,
- bool ForceNonPrivate) const {
+ bool CannotUsePrivateLabel) const {
raw_svector_ostream OS(OutName);
- getNameWithPrefix(OS, GV, CannotUsePrivateLabel, ForceNonPrivate);
+ getNameWithPrefix(OS, GV, CannotUsePrivateLabel);
}
More information about the llvm-commits
mailing list