As a preparation for implementing DWARFv5 address ranges generation,
this patch refactors existing address ranges generation code:
Split emitUnitRangesEntries into two functions emitDwarfDebugArangesTable
and emitDwarfDebugRangesTableFragment. Use AddressRanges to prepare linked
address ranges. Refactor Unit.getLowPc(), to use std::nullopt as undefined value.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM modulo a few small nits.
llvm/lib/DWARFLinker/DWARFLinker.cpp | ||
---|---|---|
1678–1679 | Can this be hoisted outside the loop? | |
llvm/lib/DWARFLinker/DWARFStreamer.cpp | ||
354–358 | Do we need the index? IIRC AddressRanges class implemented iterators so we should be able to write: for(AddressRange Range : LinkedRanges) | |
376 | Similar comment here | |
415 | And here I think |
llvm/lib/DWARFLinker/DWARFStreamer.cpp | ||
---|---|---|
415 | In this place we need index as AddressRangesMap(FunctionRanges) does not have iterators. |
Can this be hoisted outside the loop?