Ranges base address specifiers can save a lot of object size in
relocation records especially in optimized builds.
For an optimized self-host build of Clang with split DWARF and debug
info compression in object files, but uncompressed debug info in the
executable, this change produces about 18% smaller object files and 6%
While it would've been nice to turn this on by default, gold's 32 bit
gdb-index support crashes on this input & I don't think there's any
perfect heuristic to implement solely in LLVM that would suffice - so
we'll need a flag one way or another (also possible people might want to
aggressively optimized for executable size that contains debug info
(even with compression this would still come at some cost to executable
size)) - so let's plumb it through.
I'm open to suggestions on naming - I suppose having "debug" in the name of the metadata attribute is a bit redundant - of course it's debug related when it's there. How fully qualified should the name be? "useRangesBaseAddressSpecifiers" is a bit of a mouthful. "rangesBaseAddresses: true" ? or just "baseAddress: true" baseAddresses?