[llvm] [NFC][Sink] Change runtime checks to asserts (PR #137354)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 12:47:38 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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/Scalar/Sink.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/Sink.cpp b/llvm/lib/Transforms/Scalar/Sink.cpp
index fd70440aa..22ba0af5d 100644
--- a/llvm/lib/Transforms/Scalar/Sink.cpp
+++ b/llvm/lib/Transforms/Scalar/Sink.cpp
@@ -70,7 +70,7 @@ static bool IsAcceptableTarget(Instruction *Inst, BasicBlock *SuccToSinkTo,
   // SuccToSinkTo, which is on the IDom chain between the nearest common
   // dominator to all uses and the current location.
   assert(DT.dominates(Inst->getParent(), SuccToSinkTo) &&
-	 "SuccToSinkTo must be dominated by current Inst location!");
+         "SuccToSinkTo must be dominated by current Inst location!");
 
   // It's never legal to sink an instruction into an EH-pad block.
   if (SuccToSinkTo->isEHPad())

``````````

</details>


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


More information about the llvm-commits mailing list