aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp
diff options
context:
space:
mode:
authorChen Zheng <czhengsz@cn.ibm.com>2021-02-25 20:39:45 -0500
committerChen Zheng <czhengsz@cn.ibm.com>2021-02-25 21:00:25 -0500
commitd39bc36b1be72a16dcc4087dce547714ded324a9 (patch)
tree56be6198eaf19cd87d53b96d60330800f9aa5f8a /llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp
parentc90dac27e94ec354a3e8919556ac5bc89b62c731 (diff)
downloadllvm-d39bc36b1be72a16dcc4087dce547714ded324a9.zip
llvm-d39bc36b1be72a16dcc4087dce547714ded324a9.tar.gz
llvm-d39bc36b1be72a16dcc4087dce547714ded324a9.tar.bz2
[debug-info] refactor emitDwarfUnitLength
remove `Hi` `Lo` argument from `emitDwarfUnitLength`, so we can make caller of emitDwarfUnitLength easier. Reviewed By: MaskRay, dblaikie, ikudrin Differential Revision: https://reviews.llvm.org/D96409
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp b/llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp
index 3df8e35..21da9d5 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp
@@ -25,12 +25,9 @@ unsigned AddressPool::getIndex(const MCSymbol *Sym, bool TLS) {
MCSymbol *AddressPool::emitHeader(AsmPrinter &Asm, MCSection *Section) {
static const uint8_t AddrSize = Asm.getDataLayout().getPointerSize();
- StringRef Prefix = "debug_addr_";
- MCSymbol *BeginLabel = Asm.createTempSymbol(Prefix + "start");
- MCSymbol *EndLabel = Asm.createTempSymbol(Prefix + "end");
- Asm.emitDwarfUnitLength(EndLabel, BeginLabel, "Length of contribution");
- Asm.OutStreamer->emitLabel(BeginLabel);
+ MCSymbol *EndLabel =
+ Asm.emitDwarfUnitLength("debug_addr", "Length of contribution");
Asm.OutStreamer->AddComment("DWARF version number");
Asm.emitInt16(Asm.getDwarfVersion());
Asm.OutStreamer->AddComment("Address size");