1 /// -fsanitize=thread requires the (potentially concurrent) counter updates to be atomic. 2 // RUN: %clang_cc1 %s -triple x86_64 -emit-llvm -fsanitize=thread -femit-coverage-notes -femit-coverage-data \ 3 // RUN: -coverage-notes-file /dev/null -coverage-data-file /dev/null -o - | FileCheck %s 4 5 // CHECK-LABEL: void @foo() 6 /// Two counters are incremented by __tsan_atomic64_fetch_add. 7 // CHECK: call i64 @__tsan_atomic64_fetch_add 8 // CHECK-NEXT: call i32 @__tsan_atomic32_fetch_sub 9 10 _Atomic(int) cnt; 11 void foo() { cnt--; } 12