[clang] [clang][RISCV] Fix clang dwarf info generation for unprtototyped function (PR #150022)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 29 03:28:30 PDT 2025


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 HEAD~1 HEAD --extensions c,cpp -- clang/test/CodeGen/RISCV/debug-info-emit-func-decl.c clang/test/CodeGen/RISCV/debug-info-emit-func-decl.cpp clang/lib/CodeGen/CGDebugInfo.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 56bea5adb..dd628c901 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -4806,7 +4806,8 @@ void CGDebugInfo::EmitFuncDeclForCallSite(llvm::CallBase *CallOrInvoke,
                                           const FunctionDecl *CalleeDecl) {
   if (!CallOrInvoke)
     return;
-  auto *Func = dyn_cast_or_null<llvm::Function>(CallOrInvoke->getCalledOperand());
+  auto *Func =
+      dyn_cast_or_null<llvm::Function>(CallOrInvoke->getCalledOperand());
   if (!Func)
     return;
   if (Func->getSubprogram())

``````````

</details>


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


More information about the cfe-commits mailing list