[flang-commits] [flang] [llvm] Fixing the location attribute added to mapInfoOp (PR #90764)
via flang-commits
flang-commits at lists.llvm.org
Wed May 1 12:21:17 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 b4a0fd40f1b94eac571d29ee7695b492934d9bfc b15058ec91b0224c3b0fae79fb5b14a838e20ae4 -- flang/lib/Lower/OpenMP/ClauseProcessor.cpp flang/lib/Lower/OpenMP/OpenMP.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Lower/OpenMP/ClauseProcessor.cpp b/flang/lib/Lower/OpenMP/ClauseProcessor.cpp
index 1af954f392..3349ea395c 100644
--- a/flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+++ b/flang/lib/Lower/OpenMP/ClauseProcessor.cpp
@@ -904,10 +904,12 @@ bool ClauseProcessor::processMap(
// optimisation passes may alter this to ByCopy or other capture
// types to optimise
auto context = converter.getFirOpBuilder().getContext();
- auto location = mlir::NameLoc::get(mlir::StringAttr::get(context, asFortran.str()), symAddr.getLoc());
+ auto location = mlir::NameLoc::get(
+ mlir::StringAttr::get(context, asFortran.str()),
+ symAddr.getLoc());
mlir::Value mapOp = createMapInfoOp(
- firOpBuilder, location, symAddr, mlir::Value{},
- asFortran.str(), bounds, {},
+ firOpBuilder, location, symAddr, mlir::Value{}, asFortran.str(),
+ bounds, {},
static_cast<
std::underlying_type_t<llvm::omp::OpenMPOffloadMappingFlags>>(
mapTypeBits),
diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index 00d9eca19d..3a03d12d1a 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -1644,13 +1644,14 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
} else if (!fir::isa_builtin_cptr_type(eleType)) {
mapFlag |= llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TO;
mapFlag |= llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_FROM;
- }
- ;
+ };
auto context = converter.getFirOpBuilder().getContext();
- auto location = mlir::NameLoc::get(mlir::StringAttr::get(context, sym.name().ToString()), baseOp.getLoc());
+ auto location = mlir::NameLoc::get(
+ mlir::StringAttr::get(context, sym.name().ToString()),
+ baseOp.getLoc());
mlir::Value mapOp = createMapInfoOp(
- firOpBuilder, location, baseOp, mlir::Value{}, name.str(),
- bounds, {},
+ firOpBuilder, location, baseOp, mlir::Value{}, name.str(), bounds,
+ {},
static_cast<
std::underlying_type_t<llvm::omp::OpenMPOffloadMappingFlags>>(
mapFlag),
``````````
</details>
https://github.com/llvm/llvm-project/pull/90764
More information about the flang-commits
mailing list