[compiler-rt] [compiler-rt][Profile][Darwin] Fix a test that expected an alignment … (PR #100469)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 14:07:28 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 b1f263e4c2466a693609a3930f53b9887be67b5b 33bf86926edff480d1e6b12a3f9e41b9ba163765 --extensions c -- compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c b/compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c
index cf3bb0cd5d..3ed7c1894b 100644
--- a/compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c
+++ b/compiler-rt/test/profile/ContinuousSyncMode/darwin-proof-of-concept.c
@@ -56,7 +56,7 @@ int create_tmpfile(char *path) {
// - &cnts_start must be page-aligned.
// - The length and offset-into-fd must be page-aligned.
int *counter_map = (int *)mmap(&cnts_start, cnts_len, PROT_READ | PROT_WRITE,
- MAP_FIXED | MAP_SHARED, fd, 0);
+ MAP_FIXED | MAP_SHARED, fd, 0);
if (counter_map != &cnts_start) {
perror("mmap");
return EXIT_FAILURE;
@@ -132,7 +132,8 @@ int main(int argc, char **argv) {
return EXIT_FAILURE;
}
if (data_start_int % 0x1000 != 0) {
- fprintf(stderr, "__pdata is not correctly aligned: 0x%lx.\n", data_start_int);
+ fprintf(stderr, "__pdata is not correctly aligned: 0x%lx.\n",
+ data_start_int);
return EXIT_FAILURE;
}
if (cnts_start_int + 0x1000 != data_start_int) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/100469
More information about the llvm-commits
mailing list