[llvm] [DWARF] Add accessor for NameIndex Offsets field. (PR #88783)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 12:38:19 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-debuginfo

Author: None (cmtice)

<details>
<summary>Changes</summary>

Add an accessor function to DWARFDebugNames::NameIndex to allow other classes to access the Offsets field within NameIndex.

---
Full diff: https://github.com/llvm/llvm-project/pull/88783.diff


1 Files Affected:

- (modified) llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h (+3) 


``````````diff
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
index 9543b78ea61309..0d447a78cdc614 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
@@ -608,6 +608,9 @@ class DWARFDebugNames : public DWARFAcceleratorTable {
     /// Returns Hdr field
     Header getHeader() const { return Hdr; }
 
+    /// Returns Offsets field
+    DWARFDebugNamesOffsets getOffsets() const { return Offsets; }
+
     /// Reads offset of compilation unit CU. CU is 0-based.
     uint64_t getCUOffset(uint32_t CU) const;
     uint32_t getCUCount() const { return Hdr.CompUnitCount; }

``````````

</details>


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


More information about the llvm-commits mailing list