[llvm] [BOLT][DWARF] Refactor legacy ranges writers (PR #96006)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 18:27:46 PDT 2024
================
@@ -1320,15 +1326,18 @@ void DWARFRewriter::updateDWARFObjectAddressRanges(
// If we are at this point we are in the CU/Skeleton CU, and
// DW_AT_GNU_ranges_base or DW_AT_rnglists_base doesn't exist.
- if (Unit.getVersion() <= 4)
+ if (Unit.getVersion() <= 4) {
DIEBldr.addValue(&Die, dwarf::DW_AT_GNU_ranges_base, dwarf::DW_FORM_data4,
- DIEInteger(*RangesBase));
- else if (Unit.getVersion() == 5)
+ DIEInteger(INT_MAX));
+ LegacyRangesWritersByCU[*Unit.getDWOId()]->setDie(
----------------
ayermolo wrote:
I wonder that since this will be multi threaded, it's better to use find. [] Can write. Although in this particular case it should be read only.
https://github.com/llvm/llvm-project/pull/96006
More information about the llvm-commits
mailing list