[flang-commits] [flang] [Flang][OpenMP] Add lowering support for is_device_ptr clause (PR #168875)
via flang-commits
flang-commits at lists.llvm.org
Thu Nov 20 06:00:35 PST 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 origin/main HEAD --extensions cpp -- flang/lib/Lower/OpenMP/OpenMP.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index 2e7b306af..908ba4ace 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -2550,7 +2550,8 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
if (!isDevicePtrSyms.empty()) {
fir::FirOpBuilder &builder = converter.getFirOpBuilder();
llvm::DenseMap<const semantics::Symbol *, mlir::Value> symToMapInfo;
- for (auto [symPtr, mapVal] : llvm::zip(hasDeviceAddrSyms, clauseOps.hasDeviceAddrVars))
+ for (auto [symPtr, mapVal] :
+ llvm::zip(hasDeviceAddrSyms, clauseOps.hasDeviceAddrVars))
if (symPtr)
symToMapInfo.try_emplace(symPtr, mapVal);
@@ -2582,8 +2583,7 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
converter.getCurrentLocation());
mlir::Value baseOp = info.rawInput;
- if (auto refType =
- mlir::dyn_cast<fir::ReferenceType>(baseOp.getType()))
+ if (auto refType = mlir::dyn_cast<fir::ReferenceType>(baseOp.getType()))
(void)refType; // element type not needed for storage-only mapping
mlir::Value mapVal = createMapInfoOp(
``````````
</details>
https://github.com/llvm/llvm-project/pull/168875
More information about the flang-commits
mailing list