[flang-commits] [flang] [flang][OpenMP] Implement getOpenMPVersion helper function, NFC (PR #90086)
via flang-commits
flang-commits at lists.llvm.org
Tue Apr 30 06:04:12 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 18376810f359dbd39d2a0aa0ddfc0f7f50eac199 cf2f99488c313169c503fe01a2e90cbc51d61be8 -- flang/include/flang/Tools/CrossToolHelpers.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/include/flang/Tools/CrossToolHelpers.h b/flang/include/flang/Tools/CrossToolHelpers.h
index fa511a0b19..f059b2fba1 100644
--- a/flang/include/flang/Tools/CrossToolHelpers.h
+++ b/flang/include/flang/Tools/CrossToolHelpers.h
@@ -133,7 +133,8 @@ void setOpenMPVersionAttribute(mlir::ModuleOp &module, int64_t version) {
mlir::omp::VersionAttr::get(module.getContext(), version));
}
-int64_t getOpenMPVersionAttribute(mlir::ModuleOp module, int64_t fallback = -1) {
+int64_t getOpenMPVersionAttribute(
+ mlir::ModuleOp module, int64_t fallback = -1) {
if (mlir::Attribute verAttr = module->getAttr("omp.version"))
return llvm::cast<mlir::omp::VersionAttr>(verAttr).getVersion();
return fallback;
``````````
</details>
https://github.com/llvm/llvm-project/pull/90086
More information about the flang-commits
mailing list