[PATCH] D96327: [CodeGen] Fix two dots between text section name and symbol name
TaoPan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 9 17:41:14 PST 2021
TaoPan updated this revision to Diff 322555.
TaoPan added a comment.
git rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96327/new/
https://reviews.llvm.org/D96327
Files:
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Index: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
===================================================================
--- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -624,6 +624,8 @@
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;
}
@@ -915,7 +917,9 @@
} else {
Name += MBB.getParent()->getSection()->getName();
if (TM.getUniqueBasicBlockSectionNames()) {
- Name += ".";
+ if (!Name.endswith(".")) {
+ Name += ".";
+ }
Name += MBB.getSymbol()->getName();
} else {
UniqueID = NextUniqueID++;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96327.322555.patch
Type: text/x-patch
Size: 853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210210/d347679a/attachment.bin>
More information about the llvm-commits
mailing list