diff options
Diffstat (limited to 'test/Driver/msan.c')
-rw-r--r-- | test/Driver/msan.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Driver/msan.c b/test/Driver/msan.c index d810f4ca14..18ef2a96ca 100644 --- a/test/Driver/msan.c +++ b/test/Driver/msan.c @@ -1,3 +1,5 @@ +// REQUIRES: x86-registered-target + // RUN: %clang -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN // RUN: %clang -O1 -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN // RUN: %clang -O2 -target x86_64-unknown-linux -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN @@ -15,6 +17,13 @@ // Verify that -fsanitize=memory and -fsanitize=kernel-memory invoke MSan/KMSAN instrumentation. +// Also check that this works with the new pass manager with and without +// optimization +// RUN: %clang -target x86_64-unknown-linux -fexperimental-new-pass-manager -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN +// RUN: %clang -O1 -target x86_64-unknown-linux -fexperimental-new-pass-manager -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN +// RUN: %clang -O2 -target x86_64-unknown-linux -fexperimental-new-pass-manager -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN +// RUN: %clang -O3 -target x86_64-unknown-linux -fexperimental-new-pass-manager -fsanitize=memory %s -S -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-MSAN + int foo(int *a) { return *a; } // CHECK-MSAN: __msan_init // CHECK-KMSAN: __msan_get_context_state |