[llvm] [CodeGen] Port `GCInfoPrinter` to new pass manager (PR #74972)

via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 9 22:03:48 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 b85f1f9b182234ba366d78ae2174a149e44d08c1 b88258cdf4afe684f66c69d75ec4cfbb3d27f6dd -- llvm/include/llvm/CodeGen/CodeGenPassBuilder.h llvm/include/llvm/CodeGen/GCMetadata.h llvm/lib/CodeGen/GCMetadata.cpp llvm/lib/Passes/PassBuilder.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/GCMetadata.cpp b/llvm/lib/CodeGen/GCMetadata.cpp
index d7b54a1556..b458a698e4 100644
--- a/llvm/lib/CodeGen/GCMetadata.cpp
+++ b/llvm/lib/CodeGen/GCMetadata.cpp
@@ -47,10 +47,10 @@ public:
 
 bool GCStrategyMap::invalidate(Module &M, const PreservedAnalyses &PA,
                                ModuleAnalysisManager::Invalidator &) {
-  for(const auto &F : M) {
-    if(F.isDeclaration() || !F.hasGC())
+  for (const auto &F : M) {
+    if (F.isDeclaration() || !F.hasGC())
       continue;
-    if(!StrategyMap.contains(F.getGC()))
+    if (!StrategyMap.contains(F.getGC()))
       return true;
   }
   return false;

``````````

</details>


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


More information about the llvm-commits mailing list