Empty address range tables are allowed by the DWARF standard; moreover, generating them is recommended as a best practice.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/DebugInfo/X86/dwarfdump-debug-aranges.s | ||
---|---|---|
22 | Might be better to hardcode the value here (since you're hardcoding the '7' anyway) & include a comment about what this is padding out to? (& just for amusement I looked at the DWARF spec & I find no mention of this padding - though clearly GCC and LLVM emit & parse/expect such padding) |
- Add a macro and an explanation comment for the padding wizardry in the test. Hope it is more clear now.
Padding stuff seems like overkill to me, hardcoding the actual value seems like it'd probably be fine, but I don't mind so much.
- Use hardcoded padding.
It looks like I was not very convincing about the macro for calculating the padding. Moreover, as I am adding gtest-based unit tests in other patches, and they anyway use hardcoded paddings, it makes less sense to have that intricate calculation anymore.
llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp | ||
---|---|---|
93 | FYI, the LLVM coding style prefers putting the comment on a line of its own before the statement. |
llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp | ||
---|---|---|
93 | I am unable to find such a recommendation in https://llvm.org/docs/CodingStandards.html. Could you point that out? Anyway, these lines are temporary and are going to be removed in the next patch of the stack, D71875. |
FYI, the LLVM coding style prefers putting the comment on a line of its own before the statement.