23 lines · c
1/// For -fprofile-instr-generate and -fprofile-arcs, increment counters atomically2/// if -fprofile-update={atomic,prefer-atomic} is specified.3// RUN: %clang -### %s -c -fprofile-update=atomic 2>&1 | FileCheck %s4// RUN: %clang -### %s -c -fprofile-update=prefer-atomic 2>&1 | FileCheck %s5 6// CHECK: "-fprofile-update=atomic"7 8// RUN: %clang -### %s -c -fprofile-update=atomic -fprofile-update=single 2>&1 | FileCheck %s --check-prefix=SINGLE9 10// SINGLE-NOT: "-fprofile-update=atomic"11 12// RUN: not %clang %s -c -fprofile-update=unknown 2>&1 | FileCheck %s --check-prefix=ERROR13 14// ERROR: error: unsupported argument 'unknown' to option '-fprofile-update='15 16// AIX specific tests17// RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate -fprofile-update=atomic 2>&1 | FileCheck %s --check-prefix=AIX18// RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate -fprofile-update=prefer-atomic 2>&1 | FileCheck %s --check-prefix=AIX19// RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate 2>&1 | FileCheck %s --check-prefix=AIX-NOATOMIC20// RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate -fprofile-update=single 2>&1 | FileCheck %s --check-prefix=AIX-NOATOMIC21// AIX: "-latomic"22// AIX-NOATOMIC-NOT: "-latomic"23