1 /// For -fprofile-instr-generate and -fprofile-arcs, increment counters atomically
2 /// if -fprofile-update={atomic,prefer-atomic} or -fsanitize=thread is specified.
3 // RUN: %clang -### %s -c -target x86_64-linux -fsanitize=thread %s 2>&1 | FileCheck %s
4 // RUN: %clang -### %s -c -fprofile-update=atomic 2>&1 | FileCheck %s
5 // RUN: %clang -### %s -c -fprofile-update=prefer-atomic 2>&1 | FileCheck %s
6 
7 // CHECK: "-fprofile-update=atomic"
8 
9 // RUN: %clang -### %s -c -fprofile-update=atomic -fprofile-update=single 2>&1 | FileCheck %s --check-prefix=SINGLE
10 
11 // SINGLE-NOT: "-fprofile-update=atomic"
12 
13 // RUN: not %clang %s -c -fprofile-update=unknown 2>&1 | FileCheck %s --check-prefix=ERROR
14 
15 // ERROR: error: unsupported argument 'unknown' to option 'fprofile-update='
16