[llvm] [DWARFYAML] Add support for v5 debug_line entry formats (PR #191358)

Pavel Labath via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 07:01:40 PDT 2026


================
@@ -619,12 +628,14 @@ Error DWARFYAML::emitDebugLine(raw_ostream &OS, const DWARFYAML::Data &DI) {
       writeInteger(OpcodeLength, BufferOS, DI.IsLittleEndian);
 
     if (LineTable.Version >= 5) {
+      writeV5EntryFormat(BufferOS, LineTable.DirectoryEntryFormatCount,
+                         LineTable.DirectoryEntryFormat);
       // TODO: Support directories and file names in DWARFv5
-      writeInteger(/*directory_entry_format_count=*/uint8_t(0), BufferOS,
-                   DI.IsLittleEndian);
       encodeULEB128(/*directories_count=*/0, BufferOS);
-      writeInteger(/*file_name_entry_format_count=*/uint8_t(0), BufferOS,
-                   DI.IsLittleEndian);
+
+      writeV5EntryFormat(BufferOS, LineTable.FileNameEntryFormatCount,
+                         LineTable.FileNameEntryFormat);
+      // TODO: Support directories and file names in DWARFv5
----------------
labath wrote:

Works for me.

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


More information about the llvm-commits mailing list