[llvm] [GlobalISel] Make IRTranslator able to handle PHIs with empty types. (PR #73235)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 23 04:20:23 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 7b97d5048a8f5261bf493ad8989f0eaed59c4bf1 39d68a11b844ebe060a969fb00a4addfd2799218 -- llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index ac6fa144fa..f82d4f75ff 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -3118,8 +3118,8 @@ void IRTranslator::finishPendingPhis() {
 #endif // ifndef NDEBUG
   for (auto &Phi : PendingPHIs) {
     const PHINode *PI = Phi.first;
-      if (PI->getType()->isEmptyTy())
-        continue;
+    if (PI->getType()->isEmptyTy())
+      continue;
     ArrayRef<MachineInstr *> ComponentPHIs = Phi.second;
     MachineBasicBlock *PhiMBB = ComponentPHIs[0]->getParent();
     EntryBuilder->setDebugLoc(PI->getDebugLoc());

``````````

</details>


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


More information about the llvm-commits mailing list