[llvm] [CodeExtractor] Terminate callsite blocks to new `noreturn` functions with `unreachable` (PR #84682)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 10 09:53:48 PDT 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 862c7e0218f27b55a5b75ae59a4f73cd4610448d 1ef8926c8b2e834e2d44de30ce064f3da82a9e06 -- llvm/lib/Transforms/Utils/CodeExtractor.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Utils/CodeExtractor.cpp b/llvm/lib/Transforms/Utils/CodeExtractor.cpp
index ee4e52cefe..83a125ade2 100644
--- a/llvm/lib/Transforms/Utils/CodeExtractor.cpp
+++ b/llvm/lib/Transforms/Utils/CodeExtractor.cpp
@@ -1402,7 +1402,7 @@ CallInst *CodeExtractor::emitCallAndSwitchStatement(Function *newFunction,
Type *OldFnRetTy = TheSwitch->getParent()->getParent()->getReturnType();
switch (NumExitBlocks) {
case 0:
- // If fn is no return, end with an unreachable terminator.
+ // If fn is no return, end with an unreachable terminator.
if (newFunction->doesNotReturn()) {
(void)new UnreachableInst(Context, TheSwitch->getIterator());
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/84682
More information about the llvm-commits
mailing list