[llvm-commits] [compiler-rt] r161936 - in /compiler-rt/trunk/lib: ./ asan/lit_tests/ asan/lit_tests/Linux/

Alexey Samsonov samsonov at google.com
Wed Aug 15 01:54:15 PDT 2012


Author: samsonov
Date: Wed Aug 15 03:54:14 2012
New Revision: 161936

URL: http://llvm.org/viewvc/llvm-project?rev=161936&view=rev
Log:
[ASan] use clangxx_asan instead of clang_asan for C++ lit tests

Modified:
    compiler-rt/trunk/lib/asan/lit_tests/Linux/clone_test.cc
    compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_failure_test.cc
    compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_malloc_test.cc
    compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_test.cc
    compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc
    compiler-rt/trunk/lib/asan/lit_tests/default_options.cc
    compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc
    compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc
    compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc
    compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc
    compiler-rt/trunk/lib/asan/lit_tests/lit.cfg
    compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc
    compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc
    compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc
    compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc
    compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc
    compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc
    compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc
    compiler-rt/trunk/lib/lit.common.cfg

Modified: compiler-rt/trunk/lib/asan/lit_tests/Linux/clone_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/Linux/clone_test.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/Linux/clone_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/Linux/clone_test.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_failure_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_failure_test.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_failure_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_failure_test.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_malloc_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_malloc_test.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_malloc_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_malloc_test.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_test.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/Linux/interception_test.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc Wed Aug 15 03:54:14 2012
@@ -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

Modified: compiler-rt/trunk/lib/asan/lit_tests/default_options.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/default_options.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/default_options.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/default_options.cc Wed Aug 15 03:54:14 2012
@@ -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";

Modified: compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc Wed Aug 15 03:54:14 2012
@@ -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

Modified: compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc Wed Aug 15 03:54:14 2012
@@ -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

Modified: compiler-rt/trunk/lib/asan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/lit.cfg?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/lit.cfg Wed Aug 15 03:54:14 2012
@@ -24,13 +24,15 @@
 
 # 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

Modified: compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc Wed Aug 15 03:54:14 2012
@@ -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

Modified: compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc Wed Aug 15 03:54:14 2012
@@ -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>

Modified: compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc Wed Aug 15 03:54:14 2012
@@ -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

Modified: compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc Wed Aug 15 03:54:14 2012
@@ -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

Modified: compiler-rt/trunk/lib/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lit.common.cfg?rev=161936&r1=161935&r2=161936&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lit.common.cfg (original)
+++ compiler-rt/trunk/lib/lit.common.cfg Wed Aug 15 03:54:14 2012
@@ -42,8 +42,10 @@
 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.





More information about the llvm-commits mailing list