[llvm] [DebugInfo][RemoveDIs] Make debugify pass convert to/from RemoveDIs mode (PR #73251)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 23 08:20:55 PST 2023


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 1fb91beb173b1c3ca93c6ac6e01aab210369e083 aa96d6a3b2b824fca3b1030837c444d2af74db0d -- llvm/lib/Transforms/Utils/Debugify.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp
index 2a7e93139c..ee91653b1c 100644
--- a/llvm/lib/Transforms/Utils/Debugify.cpp
+++ b/llvm/lib/Transforms/Utils/Debugify.cpp
@@ -805,7 +805,8 @@ struct DebugifyModulePass : public ModulePass {
     if (OldDebugMode)
       M.convertFromNewDbgValues();
 
-    bool Result = applyDebugify(M, Mode, DebugInfoBeforePass, NameOfWrappedPass);
+    bool Result =
+        applyDebugify(M, Mode, DebugInfoBeforePass, NameOfWrappedPass);
 
     if (OldDebugMode)
       M.convertToNewDbgValues();
@@ -838,7 +839,8 @@ struct DebugifyFunctionPass : public FunctionPass {
     if (OldDebugMode)
       F.convertFromNewDbgValues();
 
-    bool Result = applyDebugify(F, Mode, DebugInfoBeforePass, NameOfWrappedPass);
+    bool Result =
+        applyDebugify(F, Mode, DebugInfoBeforePass, NameOfWrappedPass);
 
     if (OldDebugMode)
       F.convertToNewDbgValues();
@@ -875,12 +877,12 @@ struct CheckDebugifyModulePass : public ModulePass {
     bool Result;
     if (Mode == DebugifyMode::SyntheticDebugInfo)
       Result = checkDebugifyMetadata(M, M.functions(), NameOfWrappedPass,
-                                   "CheckModuleDebugify", Strip, StatsMap);
+                                     "CheckModuleDebugify", Strip, StatsMap);
     else
       Result = checkDebugInfoMetadata(
-        M, M.functions(), *DebugInfoBeforePass,
-        "CheckModuleDebugify (original debuginfo)", NameOfWrappedPass,
-        OrigDIVerifyBugsReportFilePath);
+          M, M.functions(), *DebugInfoBeforePass,
+          "CheckModuleDebugify (original debuginfo)", NameOfWrappedPass,
+          OrigDIVerifyBugsReportFilePath);
 
     if (OldDebugMode)
       M.convertToNewDbgValues();
@@ -927,13 +929,13 @@ struct CheckDebugifyFunctionPass : public FunctionPass {
     bool Result;
     if (Mode == DebugifyMode::SyntheticDebugInfo)
       Result = checkDebugifyMetadata(M, make_range(FuncIt, std::next(FuncIt)),
-                                   NameOfWrappedPass, "CheckFunctionDebugify",
-                                   Strip, StatsMap);
+                                     NameOfWrappedPass, "CheckFunctionDebugify",
+                                     Strip, StatsMap);
     else
       Result = checkDebugInfoMetadata(
-        M, make_range(FuncIt, std::next(FuncIt)), *DebugInfoBeforePass,
-        "CheckFunctionDebugify (original debuginfo)", NameOfWrappedPass,
-        OrigDIVerifyBugsReportFilePath);
+          M, make_range(FuncIt, std::next(FuncIt)), *DebugInfoBeforePass,
+          "CheckFunctionDebugify (original debuginfo)", NameOfWrappedPass,
+          OrigDIVerifyBugsReportFilePath);
 
     if (OldDebugMode)
       F.convertToNewDbgValues();
@@ -1022,7 +1024,7 @@ PreservedAnalyses NewPMDebugifyPass::run(Module &M, ModuleAnalysisManager &) {
                               NameOfWrappedPass);
 
   if (OldDebugMode)
-      M.convertToNewDbgValues();
+    M.convertToNewDbgValues();
 
   PreservedAnalyses PA;
   PA.preserveSet<CFGAnalyses>();

``````````

</details>


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


More information about the llvm-commits mailing list