[llvm] [DebugInfo] Add macro tracking support to DebugInfoFinder (PR #179931)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 5 06:32:40 PST 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 cpp,h -- llvm/include/llvm/IR/DebugInfo.h llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp llvm/lib/IR/DebugInfo.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/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index dcdcc7024..ce641a394 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -296,7 +296,8 @@ void DebugInfoFinder::processMacroNode(DIMacroNode *Macro,
   }
 
   auto *MF = dyn_cast<DIMacroFile>(Macro);
-  assert(MF && "Expected a DIMacroFile (it can't be any other type at this point)");
+  assert(MF &&
+         "Expected a DIMacroFile (it can't be any other type at this point)");
 
   // Check if we've already seen this macro file to avoid infinite recursion
   if (!NodesSeen.insert(MF).second)
@@ -304,7 +305,7 @@ void DebugInfoFinder::processMacroNode(DIMacroNode *Macro,
 
   // Recursively process nested macros in the macro file
   for (auto *Element : MF->getElements()) {
-      processMacroNode(Element, MF);
+    processMacroNode(Element, MF);
   }
 }
 

``````````

</details>


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


More information about the llvm-commits mailing list