[PATCH] D155666: Do not emit a .debug_addr section if the DW_AT_addr_base is not set.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 22 04:32:48 PDT 2023


avl accepted this revision.
avl added a comment.
This revision is now accepted and ready to land.

LGTM assuming inline comment is addressed.



================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:2589
       Linker.generateUnitLocations(*CurrentUnit, File, ProcessExpr);
-      emitDebugAddrSection(*CurrentUnit, DwarfVersion);
+      if (!AddrPool.Addrs.empty())
+        emitDebugAddrSection(*CurrentUnit, DwarfVersion);
----------------
this check is redundant. emitDebugAddrSection already checks  for AddrPool.Addrs.empty(). it can be removed.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155666/new/

https://reviews.llvm.org/D155666



More information about the llvm-commits mailing list