diff options
Diffstat (limited to 'test/Driver/tsan.c')
-rw-r--r-- | test/Driver/tsan.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Driver/tsan.c b/test/Driver/tsan.c index 82a0785c07..ea88f87450 100644 --- a/test/Driver/tsan.c +++ b/test/Driver/tsan.c @@ -1,3 +1,5 @@ +// REQUIRES: x86-registered-target + // RUN: %clang -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O1 -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // RUN: %clang -O2 -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s @@ -5,5 +7,13 @@ // RUN: %clang -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s // Verify that -fsanitize=thread invokes tsan instrumentation. +// Also check that this works with the new pass manager with and without +// optimization +// RUN: %clang -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O1 -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O2 -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -O3 -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang -fexperimental-new-pass-manager -target x86_64-unknown-linux -fsanitize=thread %s -S -emit-llvm -o - | FileCheck %s + int foo(int *a) { return *a; } // CHECK: __tsan_init |