[compiler-rt] [compiler-rt][fuzzer] implements SetThreadName for fuchsia. (PR #99953)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 14:24:38 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 d48d4805f792adbdac58d480f890449def4964ea 715c392fd069dd3ca3507689439533fabd7e5865 --extensions cpp -- compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp
index 0e0dd5a232..ffb1240c63 100644
--- a/compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp
@@ -608,9 +608,10 @@ size_t PageSize() {
void SetThreadName(std::thread &thread, const std::string &name) {
if (name.size() > 31) {
- name.resize(31);
- }
- (void)zx_object_set_property(thread.native_handle(), ZX_PROP_NAME, name.c_str(), name.size());
+ name.resize(31);
+ }
+ (void)zx_object_set_property(thread.native_handle(), ZX_PROP_NAME,
+ name.c_str(), name.size());
}
} // namespace fuzzer
``````````
</details>
https://github.com/llvm/llvm-project/pull/99953
More information about the llvm-commits
mailing list