DW_OP_GNU_addr_index has been renamed as DW_OP_addrx in the standard. clang produces DW_OP_addrx tags and with this change lldb starts to process them.
Would a test similar to lit/SymbolFile/DWARF/array-sizes.s be possible/appropriate?
I'm thinking of something like:
- produce debug info in the form of a .s file (either with clang of via hand-tuning dwarf) which uses DW_OP_addrx
- assemble&link it
- run lldb, have it open the file and print the value of the global variable
The advantage of this would be that it's more explicit about what is being tested, and it would keep testing the same thing even if clang decides to encode variable locations differently in the future.