[lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 01:30:52 PDT 2024
================
@@ -64,6 +64,32 @@ class DWARFAcceleratorTable {
return std::nullopt;
}
+ /// Returns the type signature of the Type Unit associated with this
+ /// Accelerator Entry or std::nullopt if the Type Unit offset is not
+ /// recorded in this Accelerator Entry.
+ virtual std::optional<uint64_t> getForeignTUTypeSignature() const {
+ // Default return for accelerator tables that don't support type units.
+ return std::nullopt;
+ }
+
+ // Returns the the CU offset for a foreign TU.
+ //
+ // Entries that represent foreign type units can have both a
+ // DW_IDX_compile_unit and a DW_IDX_type_unit. In this case the
----------------
labath wrote:
Reading about DW_IDX_compile_unit in a supposedly-generic interface feels a bit out of place. Do these even need to be defined on the interface? AFAICT, the only callers are in DebugNamesDWARFIndex, which already know they are dealing with a debug_names table, and the debug_names entry class already has a bunch of non-virtual methods (`hasParentInformation` and friends) for debug_names-specific functionality.
https://github.com/llvm/llvm-project/pull/87740
More information about the llvm-commits
mailing list