[llvm] [Offload] Guard __llvm_write_custom_profile null check on non-Windows (PR #207170)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 05:46:59 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 cpp -- offload/plugins-nextgen/common/src/GlobalHandler.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/plugins-nextgen/common/src/GlobalHandler.cpp b/offload/plugins-nextgen/common/src/GlobalHandler.cpp
index 5a0aa5d5b..e518c7bf0 100644
--- a/offload/plugins-nextgen/common/src/GlobalHandler.cpp
+++ b/offload/plugins-nextgen/common/src/GlobalHandler.cpp
@@ -277,7 +277,8 @@ void GPUProfGlobals::dump() const {
Error GPUProfGlobals::write() const {
#ifndef _WIN32
// On Windows __llvm_write_custom_profile is a strong stub (see above), so its
- // address is never null and this check would trigger -Wpointer-bool-conversion.
+ // address is never null and this check would trigger
+ // -Wpointer-bool-conversion.
if (!__llvm_write_custom_profile)
return Plugin::error(ErrorCode::INVALID_BINARY,
"could not find symbol __llvm_write_custom_profile. "
``````````
</details>
https://github.com/llvm/llvm-project/pull/207170
More information about the llvm-commits
mailing list