mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-30 03:56:06 +00:00

After a07b135ce0c0111bd83450b5dc29ef0381cdbc39, we always pass -coverage-notes-file/-coverage-data-file for driver options -ftest-coverage/-fprofile-arcs/--coverage. As a bonus, we can make the following simplification to cc1 options: * `-ftest-coverage -coverage-notes-file a.gcno` => `-coverage-notes-file a.gcno` * `-fprofile-arcs -coverage-data-file a.gcda` => `-coverage-data-file a.gcda` and remove EmitCovNotes/EmitCovArcs.
13 lines
547 B
C
13 lines
547 B
C
/// -fprofile-update=atomic (implied by -fsanitize=thread) requires the
|
|
/// (potentially concurrent) counter updates to be atomic.
|
|
// RUN: %clang_cc1 %s -triple x86_64 -emit-llvm -fprofile-update=atomic \
|
|
// RUN: -coverage-notes-file /dev/null -coverage-data-file /dev/null -o - | FileCheck %s
|
|
|
|
// CHECK-LABEL: void @foo()
|
|
/// Two counters are incremented by __tsan_atomic64_fetch_add.
|
|
// CHECK: atomicrmw add ptr @__llvm_gcov_ctr{{.*}} monotonic, align 8
|
|
// CHECK-NEXT: atomicrmw sub ptr
|
|
|
|
_Atomic(int) cnt;
|
|
void foo(void) { cnt--; }
|