[flang-commits] [flang] [flang][OpenMP] simplify getReductionName (PR #85956)

via flang-commits flang-commits at lists.llvm.org
Wed Mar 20 09:11:26 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 407937036fa7640f61f225474b1ea6623a40dbdd 436c678fbb6eeee10f2950723c38889735ba150e -- flang/lib/Lower/OpenMP/ReductionProcessor.cpp
``````````

</details>

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

``````````diff
diff --git a/flang/lib/Lower/OpenMP/ReductionProcessor.cpp b/flang/lib/Lower/OpenMP/ReductionProcessor.cpp
index 6ed7d39704..d952359fe7 100644
--- a/flang/lib/Lower/OpenMP/ReductionProcessor.cpp
+++ b/flang/lib/Lower/OpenMP/ReductionProcessor.cpp
@@ -81,8 +81,10 @@ bool ReductionProcessor::supportedIntrinsicProcReduction(
   return redType;
 }
 
-std::string ReductionProcessor::getReductionName(
-    llvm::StringRef name, const fir::KindMapping& kindMap, mlir::Type ty, bool isByRef) {
+std::string
+ReductionProcessor::getReductionName(llvm::StringRef name,
+                                     const fir::KindMapping &kindMap,
+                                     mlir::Type ty, bool isByRef) {
   ty = fir::unwrapRefType(ty);
   std::string byrefSuffix = isByRef ? "_byref" : "";
   std::string typeString = fir::getTypeAsString(ty, kindMap, "");
@@ -96,9 +98,8 @@ std::string ReductionProcessor::getReductionName(
   if (isByRef)
     byrefAddition = "_byref";
 
-std::string resultName = name.str() + byrefAddition;
-return fir::getTypeAsString(ty, kindMap, resultName);
-
+  std::string resultName = name.str() + byrefAddition;
+  return fir::getTypeAsString(ty, kindMap, resultName);
 }
 
 std::string ReductionProcessor::getReductionName(

``````````

</details>


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


More information about the flang-commits mailing list