[PATCH] D46878: Keep underscores in DW_TAG_label symbol names
Dimitry Ivanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 15 07:06:29 PDT 2018
dimitry created this revision.
dimitry added a reviewer: enderby.
Herald added subscribers: llvm-commits, JDevlieghere.
Do not remove leading underscores from symbol names of exported DW_TAG_labels.
It looks like they did not have to be removed Please see bug for the details.
Bug: https://bugs.llvm.org/show_bug.cgi?id=37470
Repository:
rL LLVM
https://reviews.llvm.org/D46878
Files:
lib/MC/MCDwarf.cpp
Index: lib/MC/MCDwarf.cpp
===================================================================
--- lib/MC/MCDwarf.cpp
+++ lib/MC/MCDwarf.cpp
@@ -783,7 +783,7 @@
// The DW_TAG_label DIE abbrev (2).
MCOS->EmitULEB128IntValue(2);
- // AT_name, of the label without any leading underbar.
+ // AT_name, of the label.
MCOS->EmitBytes(Entry.getName());
MCOS->EmitIntValue(0, 1); // NULL byte to terminate the string.
@@ -937,11 +937,7 @@
if (!context.getGenDwarfSectionSyms().count(MCOS->getCurrentSectionOnly()))
return;
- // The dwarf label's name does not have the symbol name's leading
- // underbar if any.
StringRef Name = Symbol->getName();
- if (Name.startswith("_"))
- Name = Name.substr(1, Name.size()-1);
// Get the dwarf file number to be used for the dwarf label.
unsigned FileNumber = context.getGenDwarfFileNumber();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46878.146817.patch
Type: text/x-patch
Size: 881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180515/099b4ba2/attachment.bin>
More information about the llvm-commits
mailing list