DW_AT_ranges can use DW_FORM_sec_offset (instead of DW_FORM_rnglistx). In such case DW_AT_rnglists_base does not need to be present.
DWARF-5 spec:
"If the offset_entry_count is zero, then DW_FORM_rnglistx cannot be used to access a range list; DW_FORM_sec_offset must be used instead. If the offset_entry_count is non-zero, then DW_FORM_rnglistx may be used to access a range list;"
This fix is for TestTypeCompletion.py category dwarf using GCC with DWARF-5.
TestTypeCompletion.py category dwo needs a pending GCC fix: -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file
The fix just provides GetRnglist() lazy getter for m_rnglist_table.
The testcase is easier to review by: diff -u lldb/test/Shell/SymbolFile/DWARF/DW_AT_low_pc-addrx.s lldb/test/Shell/SymbolFile/DWARF/DW_AT_range-DW_FORM_sec_offset.s
clang-format: please reformat the code