[PATCH] D58698: [DWARFFormValue] Don't consider DW_FORM_data4/8 to be section offsets.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 14:54:34 PST 2019


aprantl added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp:200
+    // In DWARF3 DW_FORM_data4 and DW_FORM_data8 served also as a section
+    // offset. If we don't have a DWARFUnit, default to the old behavior.
+    if (Form == DW_FORM_data4 || Form == DW_FORM_data8)
----------------
aprantl wrote:
> "some producers" here means older versions of clang, but since older versions of clang also default to DWARF 2 (at least on Darwin) I think this is a safe change.
To clarify: what we are dropping here is support for compilers that claim to emit DWARF 3+ but still is a FORM_data4 for a section offset. I'm fine with dropping support for these.

I'm not a fan of DWARFFormValue optionally having a DWARFUnit pointer. This is asking for trouble. If we could assert that we have on in this condition (or get rid of the optionality) I'd be much happier.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58698/new/

https://reviews.llvm.org/D58698





More information about the llvm-commits mailing list