[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][NFCI] Extract DW_AT_data_member_location calculation logic (PR #68231)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 4 09:44:18 PDT 2023


================
@@ -519,6 +519,33 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc,
   return UpdateSymbolContextScopeForType(sc, die, type_sp);
 }
 
+static std::optional<uint32_t>
----------------
Michael137 wrote:

The integer types are a bit inconsistent (but this didn't change with this patch).

* `ParseInheritance` stores the value in an `off_t`. Then passes it to `clang::CharUnits::fromQuantity` which takes an `int64_t`
* The Rust `Variant` support stores offsets as uint32_t, and so does `MemberAttributes`. But `FormValue::Unsigned()` returns a uint64_t.

Would be nice to make this consistent eventually

https://github.com/llvm/llvm-project/pull/68231


More information about the lldb-commits mailing list