Address review comments

llvm-svn: 232540
This commit is contained in:
David Majnemer
2015-03-17 20:39:40 +00:00
parent 47e3842982
commit 564404cc96
3 changed files with 12 additions and 13 deletions

View File

@@ -960,13 +960,8 @@ void TargetLoweringObjectFileCOFF::getNameWithPrefix(
((isa<Function>(GV) && TM.getFunctionSections()) ||
(isa<GlobalVariable>(GV) && TM.getDataSections()))) {
SmallString<256> Tmp;
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());
Mang.getNameWithPrefix(Tmp, GV, CannotUsePrivateLabel, /*ForceNonPrivate=*/true);
OutName.append(Tmp.begin(), Tmp.end());
return;
}
Mang.getNameWithPrefix(OutName, GV, CannotUsePrivateLabel);