[llvm] [dsymutil] Add support for inline DWARF source files. (PR #77016)

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 14:38:35 PST 2024


================
@@ -874,6 +880,10 @@ void DwarfStreamer::emitLineTablePrologueV5IncludeAndFileTable(
 
     LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_directory_index);
     LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_FORM_data1);
+    if (InlineSources) {
+      LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_LLVM_source);
+      LineSectionSize += MS->emitULEB128IntValue(P.FileNames[0].Name.getForm());
----------------
JDevlieghere wrote:

Might be worth storing `P.FileNames[0].Name.getForm()` in a temporary and sharing it between line 879 and here. 

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


More information about the llvm-commits mailing list