[compiler-rt] [CopyProf] Implement minimal CopyProf runtime. (PR #223458)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 09:58:34 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 -- compiler-rt/lib/copyprof/copyprof.cpp compiler-rt/lib/copyprof/copyprof_interface_internal.h compiler-rt/lib/copyprof/copyprof_internal.h compiler-rt/lib/copyprof/copyprof_reporting.cpp compiler-rt/lib/copyprof/copyprof_reporting.h compiler-rt/lib/copyprof/copyprof_shadow.cpp compiler-rt/lib/copyprof/copyprof_shadow.h compiler-rt/lib/copyprof/copyprof_stack.cpp compiler-rt/lib/copyprof/copyprof_state.cpp compiler-rt/lib/copyprof/copyprof_state.h compiler-rt/lib/copyprof/tests/copyprof_shadow_test.cpp compiler-rt/lib/copyprof/tests/copyprof_state_test.cpp compiler-rt/lib/copyprof/tests/driver.cpp compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h --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/compiler-rt/lib/copyprof/copyprof_state.h b/compiler-rt/lib/copyprof/copyprof_state.h
index c9b2717aa..13cb6a94c 100644
--- a/compiler-rt/lib/copyprof/copyprof_state.h
+++ b/compiler-rt/lib/copyprof/copyprof_state.h
@@ -62,8 +62,8 @@ struct PerThreadState {
// The runtime is always linked into the main executable, so the state can be
// reached with the initial-exec model instead of paying for a __tls_get_addr
// call on every access.
-__attribute__((tls_model("initial-exec")))
-extern THREADLOCAL PerThreadState __copyprof_state;
+__attribute__((tls_model(
+ "initial-exec"))) extern THREADLOCAL PerThreadState __copyprof_state;
} // namespace __copyprof
diff --git a/compiler-rt/lib/copyprof/tests/driver.cpp b/compiler-rt/lib/copyprof/tests/driver.cpp
index 36d40b83a..8f92bd663 100644
--- a/compiler-rt/lib/copyprof/tests/driver.cpp
+++ b/compiler-rt/lib/copyprof/tests/driver.cpp
@@ -1,4 +1,5 @@
-//===-- driver.cpp ---------------------------------------------------------===//
+//===-- driver.cpp
+//---------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
``````````
</details>
https://github.com/llvm/llvm-project/pull/223458
More information about the llvm-commits
mailing list