[compiler-rt] [compiler-rt] [profile] Add value profile in sampling data without-libc (PR #95639)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 15 00:26:42 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 6af6416e89de1f4656a145c4843226b468718434 382696022dbcc37301247ef52a723964de048ae1 -- compiler-rt/test/profile/instrprof-all-without-libc.c compiler-rt/lib/profile/InstrProfiling.h compiler-rt/lib/profile/InstrProfilingBuffer.c compiler-rt/lib/profile/InstrProfilingInternal.h compiler-rt/lib/profile/InstrProfilingWriter.c
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/lib/profile/InstrProfilingWriter.c b/compiler-rt/lib/profile/InstrProfilingWriter.c
index 297397d12d3..a556289652b 100644
--- a/compiler-rt/lib/profile/InstrProfilingWriter.c
+++ b/compiler-rt/lib/profile/InstrProfilingWriter.c
@@ -241,9 +241,8 @@ static int writeValueProfData(ProfDataWriter *Writer,
 /* Get value profile data size for function specified with \c Data.
  * In this implementation, value profile data size is calculated with value
  * profile header. */
-COMPILER_RT_VISIBILITY uint64_t
-lprofgetValueProfDataSize(VPDataReaderType *VPDataReader,
-                          const __llvm_profile_data *Data) {
+COMPILER_RT_VISIBILITY uint64_t lprofgetValueProfDataSize(
+    VPDataReaderType *VPDataReader, const __llvm_profile_data *Data) {
   uint8_t *SiteCountArray[IPVK_Last + 1];
 
   for (unsigned I = 0; I <= IPVK_Last; I++) {
diff --git a/compiler-rt/test/profile/instrprof-all-without-libc.c b/compiler-rt/test/profile/instrprof-all-without-libc.c
index 3bc5bf8368f..13993d51d52 100644
--- a/compiler-rt/test/profile/instrprof-all-without-libc.c
+++ b/compiler-rt/test/profile/instrprof-all-without-libc.c
@@ -13,7 +13,7 @@
 #include <stdlib.h>
 
 #ifndef CHECK_SYMBOLS
-#include <stdio.h>
+#  include <stdio.h>
 #endif
 
 int __llvm_profile_runtime = 0;

``````````

</details>


https://github.com/llvm/llvm-project/pull/95639


More information about the llvm-commits mailing list