[llvm] [DWARFYAML] Add support for v5 debug_line file/dir entries (PR #192226)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 03:01:14 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- llvm/include/llvm/ObjectYAML/DWARFYAML.h llvm/lib/ObjectYAML/DWARFEmitter.cpp llvm/lib/ObjectYAML/DWARFYAML.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
index 2d49d1805..39b2f50a1 100644
--- a/llvm/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
@@ -625,7 +625,7 @@ static Error writeV5Entry(raw_ostream &OS, uint64_t Count,
                           const dwarf::FormParams &Params,
                           bool IsLittleEndian) {
   encodeULEB128(Count, OS);
-  for (ArrayRef<DWARFYAML::FormValue> Entry: EntryList) {
+  for (ArrayRef<DWARFYAML::FormValue> Entry : EntryList) {
     if (Error Err = writeFormValues(
             OS,
             map_range(Format,
@@ -666,9 +666,10 @@ Error DWARFYAML::emitDebugLine(raw_ostream &OS, const DWARFYAML::Data &DI) {
 
       writeV5EntryFormat(BufferOS, LineTable.DirectoryEntryFormatCount,
                          LineTable.DirectoryEntryFormat);
-      if (Error Err = writeV5Entry(BufferOS, LineTable.DirectoriesCount,
-                   LineTable.DirectoryEntryFormat, LineTable.Directories,
-                   Params, DI.IsLittleEndian))
+      if (Error Err =
+              writeV5Entry(BufferOS, LineTable.DirectoriesCount,
+                           LineTable.DirectoryEntryFormat,
+                           LineTable.Directories, Params, DI.IsLittleEndian))
         return Err;
 
       writeV5EntryFormat(BufferOS, LineTable.FileNameEntryFormatCount,

``````````

</details>


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


More information about the llvm-commits mailing list