This patch tries to reduce the size of the debug_loclist section by replacing the DW_LLE_start_length opcodes currently emitted by dsymutil in favor of using DW_LLE_base_address + DW_LLE_offset_pair instead.
The DW_LLE_start_length is one AddressSize followed by a ULEB per entry, whereas, the DW_LLE_base_address + DW_LLE_offset_pair will use one AddressSize for the base address, and then the DW_LLE_offset_pair is a pair of ULEBs. This will be more efficient where a loclist fragment has many entries.
I tried to see the size of the clang.dSYM and it went from 12.23 MB to 10.46 MB in size.
may be we can do all calculations inside DwarfStreamer::emitDwarfDebugLocListsTableFragment ? i.e. do not create new structure DWARFLocationExpressionsFragment, do not change DWARFLinker::generateUnitLocations, calculate and apply BaseAddress inside DwarfStreamer::emitDwarfDebugLocListsTableFragment ? Such approach allows to change output format not changing high level structures and makes overall patch smaller.