xref: /llvm-project/compiler-rt/test/profile/Inputs/instrprof-order-file.c (revision e73ae9a142c256f52bbae4be8bb0cc254afa8f6f)
1 void __llvm_profile_initialize_file(void);
2 int __llvm_orderfile_dump(void);
3 
4 __attribute__((noinline)) int f(int a);
5 
6 __attribute__((noinline)) int g(int a);
7 
main(int argc,const char * argv[])8 int main(int argc, const char *argv[]) {
9   int a = f(argc);
10   int t = 0;
11   for (int i = 0; i < argc; i++)
12     t += g(a);
13   f(t);
14   __llvm_profile_initialize_file();
15   __llvm_orderfile_dump();
16   return 0;
17 }
18