[compiler-rt] aceb67e - Add a testcase for D136192.

Wael Yehia via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 07:42:10 PDT 2022


Author: Wael Yehia
Date: 2022-10-26T14:41:06Z
New Revision: aceb67eeb516fd4ca762de6bd8194ca7f31c9f45

URL: https://github.com/llvm/llvm-project/commit/aceb67eeb516fd4ca762de6bd8194ca7f31c9f45
DIFF: https://github.com/llvm/llvm-project/commit/aceb67eeb516fd4ca762de6bd8194ca7f31c9f45.diff

LOG: Add a testcase for D136192.

Differential Revision: https://reviews.llvm.org/D136192

Added: 
    compiler-rt/test/profile/AIX/function-section-bcdtor-mbr.c

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/profile/AIX/function-section-bcdtor-mbr.c b/compiler-rt/test/profile/AIX/function-section-bcdtor-mbr.c
new file mode 100644
index 0000000000000..0ac48fa49b99d
--- /dev/null
+++ b/compiler-rt/test/profile/AIX/function-section-bcdtor-mbr.c
@@ -0,0 +1,9 @@
+// RUN: rm -f %t.profraw
+// RUN: %clang_pgogen -ffunction-sections -Wl,-bcdtors:mbr %s -o %t.gen
+// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.gen
+// RUN: llvm-profdata show %t.profraw --all-functions | FileCheck %s
+
+int foo() { return 0; }
+int main() { return foo();}
+
+// CHECK: Total functions: 2


        


More information about the llvm-commits mailing list