I need to use dwarf expressions from MC, but depending on libDebugInfoDWARF from MC creates a layering violation. The error most easily seen from bazel builds, but it shows up as link-errors under cmake as well:
The code already supports not having an object file or section at runtime by checking for null pointers. For example, DWARFDataExtractor::getRelocatedValue. But they still have this build time dependency.
Splitting it up isn’t difficult (list of patches below). But what should the final result look like? One possible solution would be to move these low-level pieces into a new library llvm/DebugInfo/DWARF/LowLevel, with some forwarding headers so that clients that don’t care can continue to work without modification, and clients that want low-level only can depend just on the low level portions.
I think in the new governance model, it’s the responsibility of the relevant area team to identify next steps. I think we have a fancy new alias to send notifications, so let me see if it works: @llvm-area-team
My two cents here is that this is a pretty low level code organization question, and basically up to reviewer discretion. If DWARF reviewers are happy with the new code organization, I am happy with the new code organization