[flang-commits] [flang] fix optional wait wrongly treated as false (PR #78145)
via flang-commits
flang-commits at lists.llvm.org
Mon Jan 15 03:30:29 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 b6f96776c5c30d0b39dcf5db9aa2f497bf99685e d1cff54be30ea65104a27c422de6ef743df2440f -- flang/lib/Optimizer/Builder/IntrinsicCall.cpp flang/runtime/execute.cpp flang/runtime/tools.cpp flang/runtime/tools.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
index 206e5cfa8f..ace421ec0f 100644
--- a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
+++ b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
@@ -2935,18 +2935,19 @@ void IntrinsicLibrary::genExecuteCommandLine(
mlir::Value waitIsPresentAtRuntime =
builder.genIsNotNullAddr(loc, waitAddr);
waitBool = builder
- .genIfOp(loc, {i1Ty}, waitIsPresentAtRuntime,
- /*withElseRegion=*/true)
- .genThen([&]() {
- auto waitLoad = builder.create<fir::LoadOp>(loc, waitAddr);
- mlir::Value cast = builder.createConvert(loc, i1Ty, waitLoad);
- builder.create<fir::ResultOp>(loc, cast);
- })
- .genElse([&]() {
- mlir::Value trueVal = builder.createBool(loc, true);
- builder.create<fir::ResultOp>(loc, trueVal);
- })
- .getResults()[0];
+ .genIfOp(loc, {i1Ty}, waitIsPresentAtRuntime,
+ /*withElseRegion=*/true)
+ .genThen([&]() {
+ auto waitLoad = builder.create<fir::LoadOp>(loc, waitAddr);
+ mlir::Value cast =
+ builder.createConvert(loc, i1Ty, waitLoad);
+ builder.create<fir::ResultOp>(loc, cast);
+ })
+ .genElse([&]() {
+ mlir::Value trueVal = builder.createBool(loc, true);
+ builder.create<fir::ResultOp>(loc, trueVal);
+ })
+ .getResults()[0];
}
mlir::Value exitstatBox =
``````````
</details>
https://github.com/llvm/llvm-project/pull/78145
More information about the flang-commits
mailing list