[PATCH] D155724: Change DW_LLE_baseaddr to DW_LLE_baseaddrx in .debug_loclist section

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 03:55:29 PDT 2023


avl added inline comments.


================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:838
   /// for \p Unit, patch the attributes referencing it.
   void generateUnitLocations(CompileUnit &Unit, const DWARFFile &File,
+                             ExpressionHandlerRef ExprHandler,
----------------
probably we can make generateUnitLocations to be method of DIECloner as it looks compile unit local?


================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:1997
+        Index = AddrPool.getAddrIndex(*BaseAddress);
+      }
     }
----------------
it looks like duplication of what is going on inside emitDwarfDebugLocListsTableFragment(). probably instead of passing Index into emitDwarfDebugLocListsTableFragment we would pass DebugAddrPool ?


```
LocListsSectionSize += MS->emitULEB128IntValue(AddrPool.getAddrIndex(*BaseAddress));

```

It makes unnecessary this additional index calculation and duplicating BaseAddress variable. 


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

https://reviews.llvm.org/D155724



More information about the llvm-commits mailing list