[llvm] [DWARF] Add accessor for NameIndex Offsets field. (PR #88783)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 12:37:43 PDT 2024
https://github.com/cmtice created https://github.com/llvm/llvm-project/pull/88783
Add an accessor function to DWARFDebugNames::NameIndex to allow other classes to access the Offsets field within NameIndex.
>From 3ce9de7cba64ba692a05dda5c1c487d03cb29cdc Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Mon, 15 Apr 2024 12:34:50 -0700
Subject: [PATCH] [DWARF] Add accessor for NameIndex Offsets field.
Add an accessor function to DWARFDebugNames::NameIndex to allow
other classes to access the Offsets field within NameIndex.
---
llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | 3 +++
1 file changed, 3 insertions(+)
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; }
More information about the llvm-commits
mailing list