[PATCH] D22179: [sanitizer] Use %clangxx in objc++ test files

Dave Lee via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 15:33:31 PDT 2016


kastiglione created this revision.
kastiglione added reviewers: samsonov, compnerd.
kastiglione added a subscriber: llvm-commits.
Herald added a subscriber: kubabrecka.

These test in this change are objc++, but are built using %clang, not %clangxx. The reason this works is the driver has been adding -lc++ for sanitizer enabled builds. By making these tests use %clangxx, they no longer depend on the driver linking to c++. The reason I want to make this change is to re-land http://reviews.llvm.org/D22018, which caused these tests to stop working.

http://reviews.llvm.org/D22179

Files:
  test/asan/TestCases/Darwin/address-range-limit.mm
  test/tsan/Darwin/gcd-blocks.mm
  test/tsan/Darwin/gcd-groups-destructor.mm
  test/tsan/Darwin/libcxx-shared-ptr-recursive.mm
  test/tsan/Darwin/libcxx-shared-ptr-stress.mm
  test/tsan/Darwin/libcxx-shared-ptr.mm
  test/tsan/Darwin/osatomics-add.mm
  test/tsan/Darwin/osatomics-list.mm

Index: test/tsan/Darwin/osatomics-list.mm
===================================================================
--- test/tsan/Darwin/osatomics-list.mm
+++ test/tsan/Darwin/osatomics-list.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan %s -o %t -framework Foundation -std=c++11
+// RUN: %clangxx_tsan %s -o %t -framework Foundation -std=c++11
 // RUN: %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
Index: test/tsan/Darwin/osatomics-add.mm
===================================================================
--- test/tsan/Darwin/osatomics-add.mm
+++ test/tsan/Darwin/osatomics-add.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan %s -o %t -framework Foundation -std=c++11
+// RUN: %clangxx_tsan %s -o %t -framework Foundation -std=c++11
 // RUN: %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
Index: test/tsan/Darwin/libcxx-shared-ptr.mm
===================================================================
--- test/tsan/Darwin/libcxx-shared-ptr.mm
+++ test/tsan/Darwin/libcxx-shared-ptr.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan %s -o %t -framework Foundation
+// RUN: %clangxx_tsan %s -o %t -framework Foundation
 // RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
Index: test/tsan/Darwin/libcxx-shared-ptr-stress.mm
===================================================================
--- test/tsan/Darwin/libcxx-shared-ptr-stress.mm
+++ test/tsan/Darwin/libcxx-shared-ptr-stress.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan %s -o %t -framework Foundation
+// RUN: %clangxx_tsan %s -o %t -framework Foundation
 // RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
Index: test/tsan/Darwin/libcxx-shared-ptr-recursive.mm
===================================================================
--- test/tsan/Darwin/libcxx-shared-ptr-recursive.mm
+++ test/tsan/Darwin/libcxx-shared-ptr-recursive.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan %s -o %t -framework Foundation
+// RUN: %clangxx_tsan %s -o %t -framework Foundation
 // RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
Index: test/tsan/Darwin/gcd-groups-destructor.mm
===================================================================
--- test/tsan/Darwin/gcd-groups-destructor.mm
+++ test/tsan/Darwin/gcd-groups-destructor.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan %s -o %t -framework Foundation
+// RUN: %clangxx_tsan %s -o %t -framework Foundation
 // RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
Index: test/tsan/Darwin/gcd-blocks.mm
===================================================================
--- test/tsan/Darwin/gcd-blocks.mm
+++ test/tsan/Darwin/gcd-blocks.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_tsan %s -o %t -framework Foundation
+// RUN: %clangxx_tsan %s -o %t -framework Foundation
 // RUN: %env_tsan_opts=ignore_interceptors_accesses=1 %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
Index: test/asan/TestCases/Darwin/address-range-limit.mm
===================================================================
--- test/asan/TestCases/Darwin/address-range-limit.mm
+++ test/asan/TestCases/Darwin/address-range-limit.mm
@@ -1,7 +1,7 @@
 // Regression test for https://code.google.com/p/address-sanitizer/issues/detail?id=368.
 
-// RUN: %clang_asan %s -Wno-deprecated-declarations -flat_namespace -bundle -undefined suppress -o %t.bundle
-// RUN: %clang_asan %s -Wno-deprecated-declarations -o %t -framework Foundation && not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan %s -Wno-deprecated-declarations -flat_namespace -bundle -undefined suppress -o %t.bundle
+// RUN: %clangxx_asan %s -Wno-deprecated-declarations -o %t -framework Foundation && not %run %t 2>&1 | FileCheck %s
 
 #import <Foundation/Foundation.h>
 #import <mach-o/dyld.h>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22179.63334.patch
Type: text/x-patch
Size: 3905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160708/1c5ef44b/attachment.bin>


More information about the llvm-commits mailing list