aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-12-21 14:04:13 -0800
committerFangrui Song <i@maskray.me>2020-12-21 14:04:13 -0800
commitd9a0c40bce5f0b1325b89c36785d82fa146547aa (patch)
tree1d058385d8d0cd0e1de265172b8f2997c19ec438 /llvm/lib/MC/MCDwarf.cpp
parentd33abc337c74d03d4e49b8d81a2dba7f23594a1a (diff)
downloadllvm-d9a0c40bce5f0b1325b89c36785d82fa146547aa.zip
llvm-d9a0c40bce5f0b1325b89c36785d82fa146547aa.tar.gz
llvm-d9a0c40bce5f0b1325b89c36785d82fa146547aa.tar.bz2
[MC] Split MCContext::createTempSymbol, default AlwaysAddSuffix to true, and add comments
CanBeUnnamed is rarely false. Splitting to a createNamedTempSymbol makes the intention clearer and matches the direction of reverted r240130 (to drop the unneeded parameters). No behavior change.
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 7f72d062..12a7d9b 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -46,10 +46,8 @@
using namespace llvm;
MCSymbol *mcdwarf::emitListsTableHeaderStart(MCStreamer &S) {
- MCSymbol *Start =
- S.getContext().createTempSymbol("debug_list_header_start", true, true);
- MCSymbol *End =
- S.getContext().createTempSymbol("debug_list_header_end", true, true);
+ MCSymbol *Start = S.getContext().createTempSymbol("debug_list_header_start");
+ MCSymbol *End = S.getContext().createTempSymbol("debug_list_header_end");
auto DwarfFormat = S.getContext().getDwarfFormat();
if (DwarfFormat == dwarf::DWARF64) {
S.AddComment("DWARF64 mark");
@@ -1140,7 +1138,7 @@ static MCSymbol *emitGenDwarfRanges(MCStreamer *MCOS) {
MCSymbol *EndSymbol = mcdwarf::emitListsTableHeaderStart(*MCOS);
MCOS->AddComment("Offset entry count");
MCOS->emitInt32(0);
- RangesSymbol = context.createTempSymbol("debug_rnglist0_start", true, true);
+ RangesSymbol = context.createTempSymbol("debug_rnglist0_start");
MCOS->emitLabel(RangesSymbol);
for (MCSection *Sec : Sections) {
const MCSymbol *StartSymbol = Sec->getBeginSymbol();
@@ -1157,7 +1155,7 @@ static MCSymbol *emitGenDwarfRanges(MCStreamer *MCOS) {
MCOS->emitLabel(EndSymbol);
} else {
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfRangesSection());
- RangesSymbol = context.createTempSymbol("debug_ranges_start", true, true);
+ RangesSymbol = context.createTempSymbol("debug_ranges_start");
MCOS->emitLabel(RangesSymbol);
for (MCSection *Sec : Sections) {
const MCSymbol *StartSymbol = Sec->getBeginSymbol();