[lld] [llvm] [ThinLTO] Skip opt pipeline and summary wrapper pass on empty modules (PR #120143)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 12:58:10 PST 2024


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 56ab56c85729976f29d5de2fd73912449cb6da7c 599cde6bd3fd0cbba3d589699170fd95ef10b630 --extensions cpp -- llvm/lib/LTO/LTOBackend.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 51bd7cc29c..8a2dddce48 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -355,7 +355,8 @@ static bool isEmptyModule(const Module &Mod) {
   // Module is empty if it has no functions, no globals, no inline asm and no
   // named metadata (aliases and ifuncs require functions or globals so we
   // don't need to check those explicitly).
-  return Mod.empty() && Mod.global_empty() && Mod.named_metadata_empty() && Mod.getModuleInlineAsm().empty();
+  return Mod.empty() && Mod.global_empty() && Mod.named_metadata_empty() &&
+         Mod.getModuleInlineAsm().empty();
 }
 
 bool lto::opt(const Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod,

``````````

</details>


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


More information about the llvm-commits mailing list