1 /// For -fprofile-instr-generate and -fprofile-arcs, increment counters atomically
2 /// if -fprofile-update={atomic,prefer-atomic} is specified.
3 // RUN: %clang -### %s -c -fprofile-update=atomic 2>&1 | FileCheck %s
4 // RUN: %clang -### %s -c -fprofile-update=prefer-atomic 2>&1 | FileCheck %s
6 // CHECK: "-fprofile-update=atomic"
8 // RUN: %clang -### %s -c -fprofile-update=atomic -fprofile-update=single 2>&1 | FileCheck %s --check-prefix=SINGLE
10 // SINGLE-NOT: "-fprofile-update=atomic"
12 // RUN: not %clang %s -c -fprofile-update=unknown 2>&1 | FileCheck %s --check-prefix=ERROR
14 // ERROR: error: unsupported argument 'unknown' to option '-fprofile-update='
17 // RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate -fprofile-update=atomic 2>&1 | FileCheck %s --check-prefix=AIX
18 // RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate -fprofile-update=prefer-atomic 2>&1 | FileCheck %s --check-prefix=AIX
19 // RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate 2>&1 | FileCheck %s --check-prefix=AIX-NOATOMIC
20 // RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate -fprofile-update=single 2>&1 | FileCheck %s --check-prefix=AIX-NOATOMIC
22 // AIX-NOATOMIC-NOT: "-latomic"