[flang-commits] [flang] [Flang][Driver] Emit module summary for LTO (PR #164302)

via flang-commits flang-commits at lists.llvm.org
Tue Oct 21 11:55:33 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 -- flang/lib/Frontend/FrontendActions.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/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp
index e3853c444..c691577c6 100644
--- a/flang/lib/Frontend/FrontendActions.cpp
+++ b/flang/lib/Frontend/FrontendActions.cpp
@@ -1043,8 +1043,7 @@ void CodeGenAction::runOptimizationPipeline(llvm::raw_pwrite_stream &os) {
         mpm.addPass(llvm::PrintModulePass(os));
     } else {
       if (emitSummary && !llvmModule->getModuleFlag("ThinLTO"))
-          llvmModule->addModuleFlag(llvm::Module::Error, "ThinLTO",
-                                    uint32_t(0));
+        llvmModule->addModuleFlag(llvm::Module::Error, "ThinLTO", uint32_t(0));
       if (action == BackendActionTy::Backend_EmitBC)
         mpm.addPass(llvm::BitcodeWriterPass(
             os, /*ShouldPreserveUseListOrder=*/false, emitSummary));

``````````

</details>


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


More information about the flang-commits mailing list