mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-07-19 23:24:47 -04:00
[CodeGen] Fix two dots between text section name and symbol name
There is a trailing dot in text section name if it has prefix, don't add repeated dot when connect text section name and symbol name. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D96327
This commit is contained in:
@@ -626,6 +626,8 @@ getELFSectionNameForGlobal(const GlobalObject *GO, SectionKind Kind,
|
||||
Name.push_back('.');
|
||||
TM.getNameWithPrefix(Name, GO, Mang, /*MayAlwaysUsePrivate*/true);
|
||||
} else if (HasPrefix)
|
||||
// For distinguishing between .text.${text-section-prefix}. (with trailing
|
||||
// dot) and .text.${function-name}
|
||||
Name.push_back('.');
|
||||
return Name;
|
||||
}
|
||||
@@ -939,7 +941,8 @@ MCSection *TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(
|
||||
} else {
|
||||
Name += MBB.getParent()->getSection()->getName();
|
||||
if (TM.getUniqueBasicBlockSectionNames()) {
|
||||
Name += ".";
|
||||
if (!Name.endswith("."))
|
||||
Name += ".";
|
||||
Name += MBB.getSymbol()->getName();
|
||||
} else {
|
||||
UniqueID = NextUniqueID++;
|
||||
|
||||
Reference in New Issue
Block a user