[Lldb-commits] [PATCH] D98197: [lldb] Fix DWARF-5 DW_FORM_implicit_const (used by GCC)

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 8 09:53:23 PST 2021


jankratochvil added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp:30
+                             dw_offset_t attr_die_offset, dw_attr_t attr) {
+  AttributeValue attr_value = {const_cast<DWARFUnit *>(form_value.GetUnit()),
+                               attr_die_offset,
----------------
This `const_cast` is not nice. For its removal one can do either of:
  - Just pass the `DWARFUnit *cu` additional parameter like there was before (but it is a duplication of data)
  - de-const `DWARFUnit *` in a lot of code around: https://people.redhat.com/jkratoch/lldb-deconst.patch



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98197



More information about the lldb-commits mailing list