diff options
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 7d3d402..2530fdc 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -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++; |