[llvm-branch-commits] [llvm] [offload][omp] Load plugins through liboffload (PR #221275)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Sep 4 09:20:07 PDT 2026
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 h,cpp -- offload/include/PluginManager.h offload/liboffload/src/OffloadImpl.cpp offload/libompaccsupport/PluginManager.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/offload/libompaccsupport/PluginManager.cpp b/offload/libompaccsupport/PluginManager.cpp
index b0cb40fb3..4f0fe2ad3 100644
--- a/offload/libompaccsupport/PluginManager.cpp
+++ b/offload/libompaccsupport/PluginManager.cpp
@@ -40,17 +40,16 @@ void PluginManager::init() {
if (ol_result_t Res = olInit(nullptr))
REPORT() << "Failed to initialize liboffload: " << Res->Details;
-
if (ol_result_t Res = olIteratePlatforms(
[](ol_platform_handle_t Platform, void *Data) {
- auto *PM = static_cast<PluginManager *>(Data);
- auto *Plugin = __ol_tgt_GetPluginFromPlatform(Platform);
- ODBG(ODT_Init) << "Adding plugin " << Plugin->getName()
+ auto *PM = static_cast<PluginManager *>(Data);
+ auto *Plugin = __ol_tgt_GetPluginFromPlatform(Platform);
+ ODBG(ODT_Init) << "Adding plugin " << Plugin->getName()
<< " from liboffload";
- PM->Plugins.push_back(Plugin);
- return true;
- },
- this))
+ PM->Plugins.push_back(Plugin);
+ return true;
+ },
+ this))
REPORT() << "Failed to iterate platforms: " << Res->Details;
ODBG(ODT_Init) << "RTLs loaded!";
``````````
</details>
https://github.com/llvm/llvm-project/pull/221275
More information about the llvm-branch-commits
mailing list