[PATCH] D143561: [DebugInfo] Check if dwarf address section exists
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 01:58:33 PST 2023
lkail created this revision.
lkail added reviewers: shchenz, Esme, dblaikie, benmxwl-arm.
Herald added a project: All.
lkail requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Some targets might not feature dwarf address section. Check before emitting one.
Fixed DebugInfo test failures in https://lab.llvm.org/buildbot/#/builders/214/builds/5739.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D143561
Files:
llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
Index: llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
===================================================================
--- llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
+++ llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
@@ -582,7 +582,9 @@
StringPool->emit(*Asm, TLOF->getDwarfStrSection(),
TLOF->getDwarfStrOffSection());
- AddressPool.emit(*Asm, TLOF->getDwarfAddrSection(), AddrTableStartSym);
+ // Some targets might not have dwarf address section.
+ if (MCSection *AddrSection = TLOF->getDwarfAddrSection())
+ AddressPool.emit(*Asm, AddrSection, AddrTableStartSym);
MS->switchSection(TLOF->getDwarfInfoSection());
for (auto &CU : CompileUnits) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143561.495764.patch
Type: text/x-patch
Size: 703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230208/7b2fcfc1/attachment.bin>
More information about the llvm-commits
mailing list