With https://reviews.llvm.org/D154638, the ability to emit a .debug_addr section has been added to dsymutil. With this, instead of emitting a DW_LLE_baseaddr in the .debug_loclist section, a DW_LLE_baseaddrx can be emitted instead, which will allow for more indirection.
I opted for DW_LLE_baseaddrx + DW_LLE_offset_pair because using a DW_LLE_startx_length, because the latter would cause more entries to appear in the .debug_addr section which may lead to the size of the .debug_addr section blowing up considerably
This hasn't been introduced by this patch, but I'm curious why we need to store the addresses twice? Would AddrIndexMap.insert(std::make_pair(Addr, AddrIndexMap.size())) work just as well?