[compiler-rt] [llvm] [AIX] PGO codegen changes for function-sections. (PR #139761)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 09:16:10 PDT 2025
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 HEAD~1 HEAD --extensions c,cpp -- compiler-rt/test/profile/AIX/needs-garbage-collection.c llvm/lib/CodeGen/GlobalMerge.cpp llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/test/profile/AIX/needs-garbage-collection.c b/compiler-rt/test/profile/AIX/needs-garbage-collection.c
index e27467be0..b0c498132 100644
--- a/compiler-rt/test/profile/AIX/needs-garbage-collection.c
+++ b/compiler-rt/test/profile/AIX/needs-garbage-collection.c
@@ -10,40 +10,30 @@
// CHECK-DAG: baz
// CHECK-DAG: get_message
-
//--- main.c
-const char* get_message(void) {
- return "Hello World!";
-}
+const char *get_message(void) { return "Hello World!"; }
int foo(void);
double bar(void);
-const char* baz();
+const char *baz();
-int printf(const char*, ...);
+int printf(const char *, ...);
-int main(void) {
- printf("%s\n", baz());
-}
+int main(void) { printf("%s\n", baz()); }
//--- needs_gc.c
extern int not_def_one(const char *);
extern double not_def_two(void);
-extern const char* get_message(void);
+extern const char *get_message(void);
char buf[512];
int foo(const char *ptr, unsigned long size) {
- void *memcpy(void *, const void *, unsigned long);
- memcpy(buf, ptr, size);
- return not_def_one(buf);
-}
-
-double bar(void) {
- return not_def_two();
+ void *memcpy(void *, const void *, unsigned long);
+ memcpy(buf, ptr, size);
+ return not_def_one(buf);
}
+double bar(void) { return not_def_two(); }
-const char* baz() {
- return get_message();
-}
+const char *baz() { return get_message(); }
``````````
</details>
https://github.com/llvm/llvm-project/pull/139761
More information about the llvm-commits
mailing list