[llvm] [BOLT][DWARF] Add support for .debug_names (PR #81062)

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 12:47:54 PST 2024


================
@@ -439,6 +439,12 @@ class DebugStrOffsetsWriter {
   /// Update Str offset in .debug_str in .debug_str_offsets.
   void updateAddressMap(uint32_t Index, uint32_t Address);
 
+  /// Get offset for given index in original .debug_str_offsets section.
+  uint64_t getOffset(uint32_t Index) const {
+    assert(StrOffsets.size() > Index && "Index is out of bounds.");
----------------
dcci wrote:

I believe this should be `>=`

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


More information about the llvm-commits mailing list