diff options
19 files changed, 27 insertions, 23 deletions
diff --git a/compiler-rt/lib/asan/lit_tests/Linux/clone_test.cc b/compiler-rt/lib/asan/lit_tests/Linux/clone_test.cc index ece27b186a7..6bc419381a3 100644 --- a/compiler-rt/lib/asan/lit_tests/Linux/clone_test.cc +++ b/compiler-rt/lib/asan/lit_tests/Linux/clone_test.cc @@ -1,7 +1,7 @@ // Regression test for: // http://code.google.com/p/address-sanitizer/issues/detail?id=37 -// RUN: %clang_asan -O2 %s -o %t +// RUN: %clangxx_asan -O2 %s -o %t // RUN: %t | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/lib/asan/lit_tests/Linux/interception_failure_test.cc b/compiler-rt/lib/asan/lit_tests/Linux/interception_failure_test.cc index 015726422df..56bb2e89116 100644 --- a/compiler-rt/lib/asan/lit_tests/Linux/interception_failure_test.cc +++ b/compiler-rt/lib/asan/lit_tests/Linux/interception_failure_test.cc @@ -1,7 +1,7 @@ // If user provides his own libc functions, ASan doesn't // intercept these functions. -// RUN: %clang_asan -O2 %s -o %t +// RUN: %clangxx_asan -O2 %s -o %t // RUN: %t 2>&1 | FileCheck %s #include <stdlib.h> #include <stdio.h> diff --git a/compiler-rt/lib/asan/lit_tests/Linux/interception_malloc_test.cc b/compiler-rt/lib/asan/lit_tests/Linux/interception_malloc_test.cc index 4f1a092c4c3..6885c851306 100644 --- a/compiler-rt/lib/asan/lit_tests/Linux/interception_malloc_test.cc +++ b/compiler-rt/lib/asan/lit_tests/Linux/interception_malloc_test.cc @@ -1,6 +1,6 @@ // ASan interceptor can be accessed with __interceptor_ prefix. -// RUN: %clang_asan -O2 %s -o %t +// RUN: %clangxx_asan -O2 %s -o %t // RUN: %t 2>&1 | FileCheck %s #include <stdlib.h> #include <stdio.h> diff --git a/compiler-rt/lib/asan/lit_tests/Linux/interception_test.cc b/compiler-rt/lib/asan/lit_tests/Linux/interception_test.cc index 01111f1bee9..8a876d88916 100644 --- a/compiler-rt/lib/asan/lit_tests/Linux/interception_test.cc +++ b/compiler-rt/lib/asan/lit_tests/Linux/interception_test.cc @@ -1,6 +1,6 @@ // ASan interceptor can be accessed with __interceptor_ prefix. -// RUN: %clang_asan -O2 %s -o %t +// RUN: %clangxx_asan -O2 %s -o %t // RUN: %t 2>&1 | FileCheck %s #include <stdlib.h> #include <stdio.h> diff --git a/compiler-rt/lib/asan/lit_tests/deep_tail_call.cc b/compiler-rt/lib/asan/lit_tests/deep_tail_call.cc index 452e473dd0d..eb9cd0c3b1d 100644 --- a/compiler-rt/lib/asan/lit_tests/deep_tail_call.cc +++ b/compiler-rt/lib/asan/lit_tests/deep_tail_call.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | FileCheck %s // CHECK: AddressSanitizer global-buffer-overflow diff --git a/compiler-rt/lib/asan/lit_tests/default_options.cc b/compiler-rt/lib/asan/lit_tests/default_options.cc index 54680620fab..950a7d87919 100644 --- a/compiler-rt/lib/asan/lit_tests/default_options.cc +++ b/compiler-rt/lib/asan/lit_tests/default_options.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -O2 %s -o %t +// RUN: %clangxx_asan -O2 %s -o %t // RUN: %t 2>&1 | FileCheck %s const char *kAsanDefaultOptions="verbosity=1 foo=bar"; diff --git a/compiler-rt/lib/asan/lit_tests/dlclose-test.cc b/compiler-rt/lib/asan/lit_tests/dlclose-test.cc index c13cf7c2bcc..ca1ef0c130f 100644 --- a/compiler-rt/lib/asan/lit_tests/dlclose-test.cc +++ b/compiler-rt/lib/asan/lit_tests/dlclose-test.cc @@ -21,9 +21,9 @@ // 6. BOOM //===----------------------------------------------------------------------===// -// RUN: %clang_asan -O2 %p/SharedLibs/dlclose-test-so.cc \ +// RUN: %clangxx_asan -O2 %p/SharedLibs/dlclose-test-so.cc \ // RUN: -fPIC -shared -o %t-so.so -// RUN: %clang_asan -O2 %s -o %t +// RUN: %clangxx_asan -O2 %s -o %t // RUN: %t | FileCheck %s #include <assert.h> diff --git a/compiler-rt/lib/asan/lit_tests/global-overflow.cc b/compiler-rt/lib/asan/lit_tests/global-overflow.cc index dcb554c9932..573da6c3987 100644 --- a/compiler-rt/lib/asan/lit_tests/global-overflow.cc +++ b/compiler-rt/lib/asan/lit_tests/global-overflow.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | FileCheck %s #include <string.h> diff --git a/compiler-rt/lib/asan/lit_tests/heap-overflow.cc b/compiler-rt/lib/asan/lit_tests/heap-overflow.cc index 927194b13ce..043139aff53 100644 --- a/compiler-rt/lib/asan/lit_tests/heap-overflow.cc +++ b/compiler-rt/lib/asan/lit_tests/heap-overflow.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer > %t.output // RUN: FileCheck %s < %t.output // RUN: FileCheck %s --check-prefix=CHECK-%os < %t.output diff --git a/compiler-rt/lib/asan/lit_tests/large_func_test.cc b/compiler-rt/lib/asan/lit_tests/large_func_test.cc index 6e0a0f967bf..a353de1836d 100644 --- a/compiler-rt/lib/asan/lit_tests/large_func_test.cc +++ b/compiler-rt/lib/asan/lit_tests/large_func_test.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | c++filt > %t.output // RUN: FileCheck %s < %t.output // RUN: FileCheck %s --check-prefix=CHECK-%os < %t.output diff --git a/compiler-rt/lib/asan/lit_tests/lit.cfg b/compiler-rt/lib/asan/lit_tests/lit.cfg index 01661f02b8e..8fadd91a617 100644 --- a/compiler-rt/lib/asan/lit_tests/lit.cfg +++ b/compiler-rt/lib/asan/lit_tests/lit.cfg @@ -24,13 +24,15 @@ config.test_source_root = os.path.dirname(__file__) # Setup default compiler flags used with -faddress-sanitizer option. # FIXME: Review the set of required flags and check if it can be reduced. -clang_asan_cxxflags = ("-faddress-sanitizer " +clang_asan_cxxflags = ("-ccc-clang-cxx " + + "-ccc-cxx " + + "-faddress-sanitizer " + "-mno-omit-leaf-frame-pointer " + "-fno-omit-frame-pointer " + "-fno-optimize-sibling-calls " + "-g") -config.substitutions.append( ("%clang_asan ", (" " + config.clang + " " + - clang_asan_cxxflags + " ")) ) +config.substitutions.append( ("%clangxx_asan ", (" " + config.clang + " " + + clang_asan_cxxflags + " ")) ) # Setup path to symbolizer script. # FIXME: Instead we should copy this script to the build tree and point diff --git a/compiler-rt/lib/asan/lit_tests/memcmp_test.cc b/compiler-rt/lib/asan/lit_tests/memcmp_test.cc index 82934095601..64b831309bf 100644 --- a/compiler-rt/lib/asan/lit_tests/memcmp_test.cc +++ b/compiler-rt/lib/asan/lit_tests/memcmp_test.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | c++filt | FileCheck %s #include <string.h> diff --git a/compiler-rt/lib/asan/lit_tests/null_deref.cc b/compiler-rt/lib/asan/lit_tests/null_deref.cc index f82af11c033..91366dc04f6 100644 --- a/compiler-rt/lib/asan/lit_tests/null_deref.cc +++ b/compiler-rt/lib/asan/lit_tests/null_deref.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | c++filt > %t.output // RUN: FileCheck %s < %t.output // RUN: FileCheck %s --check-prefix=CHECK-%os < %t.output diff --git a/compiler-rt/lib/asan/lit_tests/shared-lib-test.cc b/compiler-rt/lib/asan/lit_tests/shared-lib-test.cc index 66f96c6c9d1..199076edb77 100644 --- a/compiler-rt/lib/asan/lit_tests/shared-lib-test.cc +++ b/compiler-rt/lib/asan/lit_tests/shared-lib-test.cc @@ -11,9 +11,9 @@ // //===----------------------------------------------------------------------===// -// RUN: %clang_asan -O2 %p/SharedLibs/shared-lib-test-so.cc \ +// RUN: %clangxx_asan -O2 %p/SharedLibs/shared-lib-test-so.cc \ // RUN: -fPIC -shared -o %t-so.so -// RUN: %clang_asan -O2 %s -o %t +// RUN: %clangxx_asan -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | FileCheck %s #include <dlfcn.h> diff --git a/compiler-rt/lib/asan/lit_tests/stack-overflow.cc b/compiler-rt/lib/asan/lit_tests/stack-overflow.cc index 2ff921b57ef..552a97a7c2b 100644 --- a/compiler-rt/lib/asan/lit_tests/stack-overflow.cc +++ b/compiler-rt/lib/asan/lit_tests/stack-overflow.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | FileCheck %s #include <string.h> diff --git a/compiler-rt/lib/asan/lit_tests/stack-use-after-return.cc b/compiler-rt/lib/asan/lit_tests/stack-use-after-return.cc index b404ef86230..929e7605899 100644 --- a/compiler-rt/lib/asan/lit_tests/stack-use-after-return.cc +++ b/compiler-rt/lib/asan/lit_tests/stack-use-after-return.cc @@ -1,5 +1,5 @@ // XFAIL: * -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | c++filt | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc b/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc index a2e0015cb76..ce537a46d4b 100644 --- a/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc +++ b/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | c++filt > %t.output // RUN: FileCheck %s < %t.output // RUN: FileCheck %s --check-prefix=CHECK-%os < %t.output diff --git a/compiler-rt/lib/asan/lit_tests/use-after-free.cc b/compiler-rt/lib/asan/lit_tests/use-after-free.cc index 61673b348e4..d047153791c 100644 --- a/compiler-rt/lib/asan/lit_tests/use-after-free.cc +++ b/compiler-rt/lib/asan/lit_tests/use-after-free.cc @@ -1,4 +1,4 @@ -// RUN: %clang_asan -m64 -O2 %s -o %t +// RUN: %clangxx_asan -m64 -O2 %s -o %t // RUN: %t 2>&1 | %symbolizer | c++filt > %t.output // RUN: FileCheck %s < %t.output // RUN: FileCheck %s --check-prefix=CHECK-%os < %t.output diff --git a/compiler-rt/lib/lit.common.cfg b/compiler-rt/lib/lit.common.cfg index 16ba0761e54..4c148b21e8e 100644 --- a/compiler-rt/lib/lit.common.cfg +++ b/compiler-rt/lib/lit.common.cfg @@ -42,8 +42,10 @@ if (not llvm_tools_dir) or (not os.path.exists(llvm_tools_dir)): path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path -# Define %clang substitution to use in test RUN lines. +# Define %clang and %clangxx substitutions to use in test RUN lines. config.substitutions.append( ("%clang ", (" " + config.clang + " ")) ) +config.substitutions.append( ("%clangxx ", (" " + config.clang + + " -ccc-clang-cxx -ccc-cxx ")) ) # Use ugly construction to explicitly prohibit "clang", "clang++" etc. # in RUN lines. |

