[llvm] [RFC] Emit dwarf data for signature-changed or new functions (PR #157349)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 7 09:50:53 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 origin/main HEAD --extensions cpp,h -- llvm/include/llvm/Transforms/Utils/EmitChangedFuncDebugInfo.h llvm/lib/Transforms/Utils/EmitChangedFuncDebugInfo.cpp llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h llvm/lib/Passes/PassBuilder.cpp llvm/lib/Passes/PassBuilderPipelines.cpp llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
``````````
: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/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 3245d486f..5a64fba29 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1297,7 +1297,7 @@ void DwarfDebug::addChangedSubprograms() {
DITypeRefArray Args = ExtraSP->getType()->getTypeArray();
if (Args[0])
- Cu.addType(*ScopeDIE, Args[0]);
+ Cu.addType(*ScopeDIE, Args[0]);
if (ExtraSP->getType()->getCC() == llvm::dwarf::DW_CC_nocall) {
Cu.addUInt(*ScopeDIE, dwarf::DW_AT_calling_convention,
@@ -1322,7 +1322,7 @@ void DwarfDebug::addChangedSubprograms() {
for (unsigned i = 1, N = Args.size(); i < N; ++i) {
const DIType *Ty = Args[i];
if (!Ty) {
- assert(i == N-1 && "Unspecified parameter must be the last argument");
+ assert(i == N - 1 && "Unspecified parameter must be the last argument");
Cu.createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, *ScopeDIE);
} else {
DIE &Arg =
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index fa937a9a3..40fbf5947 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -344,10 +344,10 @@
#include "llvm/Transforms/Utils/CanonicalizeAliases.h"
#include "llvm/Transforms/Utils/CanonicalizeFreezeInLoops.h"
#include "llvm/Transforms/Utils/CountVisits.h"
-#include "llvm/Transforms/Utils/EmitChangedFuncDebugInfo.h"
#include "llvm/Transforms/Utils/DXILUpgrade.h"
#include "llvm/Transforms/Utils/Debugify.h"
#include "llvm/Transforms/Utils/DeclareRuntimeLibcalls.h"
+#include "llvm/Transforms/Utils/EmitChangedFuncDebugInfo.h"
#include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
#include "llvm/Transforms/Utils/FixIrreducible.h"
#include "llvm/Transforms/Utils/HelloWorld.h"
``````````
</details>
https://github.com/llvm/llvm-project/pull/157349
More information about the llvm-commits
mailing list