r263435 - Fix some more tests with CLANG_DEFAULT_CXX_STDLIB

Jonas Hahnfeld via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 14 07:34:10 PDT 2016


Author: hahnfeld
Date: Mon Mar 14 09:34:10 2016
New Revision: 263435

URL: http://llvm.org/viewvc/llvm-project?rev=263435&view=rev
Log:
Fix some more tests with CLANG_DEFAULT_CXX_STDLIB

Also use -stdlib=platform instead of -stdlib=libstdc++ when testing if Clang
chooses the correct default for the given platform.

Modified:
    cfe/trunk/test/Driver/bitrig.c
    cfe/trunk/test/Driver/darwin-iphone-defaults.m
    cfe/trunk/test/Driver/darwin-objc-gc.m
    cfe/trunk/test/Driver/darwin-sanitizer-ld.c
    cfe/trunk/test/Driver/sanitizer-ld.c

Modified: cfe/trunk/test/Driver/bitrig.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/bitrig.c?rev=263435&r1=263434&r2=263435&view=diff
==============================================================================
--- cfe/trunk/test/Driver/bitrig.c (original)
+++ cfe/trunk/test/Driver/bitrig.c Mon Mar 14 09:34:10 2016
@@ -3,7 +3,7 @@
 // CHECK-LD-C: clang{{.*}}" "-cc1" "-triple" "amd64-pc-bitrig"
 // CHECK-LD-C: ld{{.*}}" {{.*}} "-lc" "-lclang_rt.amd64"
 
-// RUN: %clangxx -no-canonical-prefixes -target amd64-pc-bitrig %s -### 2>&1 \
+// RUN: %clangxx -stdlib=platform -no-canonical-prefixes -target amd64-pc-bitrig %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-LD-CXX-STDLIB %s
 // CHECK-LD-CXX-STDLIB: clang{{.*}}" "-cc1" "-triple" "amd64-pc-bitrig"
 // CHECK-LD-CXX-STDLIB: ld{{.*}}" {{.*}} "-lc++" "-lc++abi" "-lpthread" "-lm" "-lc" "-lclang_rt.amd64"

Modified: cfe/trunk/test/Driver/darwin-iphone-defaults.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-iphone-defaults.m?rev=263435&r1=263434&r2=263435&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-iphone-defaults.m (original)
+++ cfe/trunk/test/Driver/darwin-iphone-defaults.m Mon Mar 14 09:34:10 2016
@@ -1,4 +1,4 @@
-// RUN: %clang -target i386-apple-darwin9 -miphoneos-version-min=3.0 -arch armv7 -stdlib=libstdc++ -flto -S -o - %s | FileCheck %s
+// RUN: %clang -target i386-apple-darwin9 -miphoneos-version-min=3.0 -arch armv7 -stdlib=platform -flto -S -o - %s | FileCheck %s
 
 // CHECK: @f0() [[F0:#[0-9]+]]
 // CHECK: @__f0_block_invoke

Modified: cfe/trunk/test/Driver/darwin-objc-gc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-objc-gc.m?rev=263435&r1=263434&r2=263435&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-objc-gc.m (original)
+++ cfe/trunk/test/Driver/darwin-objc-gc.m Mon Mar 14 09:34:10 2016
@@ -1,6 +1,6 @@
 // Check that we warn, but accept, -fobjc-gc for iPhone OS.
 
-// RUN: %clang -target i386-apple-darwin9 -miphoneos-version-min=3.0 -stdlib=libstdc++ -fobjc-gc -flto -S -o %t %s 2> %t.err
+// RUN: %clang -target i386-apple-darwin9 -miphoneos-version-min=3.0 -stdlib=platform -fobjc-gc -flto -S -o %t %s 2> %t.err
 // RUN: FileCheck --check-prefix=IPHONE_OBJC_GC_LL %s < %t 
 // RUN: FileCheck --check-prefix=IPHONE_OBJC_GC_STDERR %s < %t.err
 

Modified: cfe/trunk/test/Driver/darwin-sanitizer-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-sanitizer-ld.c?rev=263435&r1=263434&r2=263435&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-sanitizer-ld.c (original)
+++ cfe/trunk/test/Driver/darwin-sanitizer-ld.c Mon Mar 14 09:34:10 2016
@@ -1,7 +1,7 @@
 // Test sanitizer link flags on Darwin.
 
 // RUN: %clang -no-canonical-prefixes -### -target x86_64-darwin \
-// RUN:   -stdlib=libstdc++ -fsanitize=address %s -o %t.o 2>&1 \
+// RUN:   -stdlib=platform -fsanitize=address %s -o %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-ASAN %s
 
 // CHECK-ASAN: "{{.*}}ld{{(.exe)?}}"
@@ -21,7 +21,7 @@
 // CHECK-DYN-ASAN: "-rpath" "{{.*}}lib{{.*}}darwin"
 
 // RUN: %clang -no-canonical-prefixes -### -target x86_64-darwin \
-// RUN:   -stdlib=libstdc++ -fsanitize=undefined %s -o %t.o 2>&1 \
+// RUN:   -stdlib=platform -fsanitize=undefined %s -o %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-UBSAN %s
 
 // CHECK-UBSAN: "{{.*}}ld{{(.exe)?}}"
@@ -57,8 +57,8 @@
 // CHECK-DYN-BOUNDS-NOT: ubsan_osx
 
 // RUN: %clang -no-canonical-prefixes -### -target x86_64-darwin \
-// RUN:   -fsanitize=address -mios-simulator-version-min=7.0 %s -o %t.o 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-ASAN-IOSSIM %s
+// RUN:   -stdlib=platform -fsanitize=address -mios-simulator-version-min=7.0 \
+// RUN:   %s -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-ASAN-IOSSIM %s
 
 // CHECK-ASAN-IOSSIM: "{{.*}}ld{{(.exe)?}}"
 // CHECK-ASAN-IOSSIM: lc++
@@ -67,7 +67,8 @@
 // CHECK-ASAN-IOSSIM: "-rpath" "{{.*}}lib{{.*}}darwin"
 
 // RUN: %clang -no-canonical-prefixes -### -target x86_64-darwin \
-// RUN:   -fsanitize=address -mtvos-simulator-version-min=8.3.0 %s -o %t.o 2>&1 \
+// RUN:   -stdlib=platform -fsanitize=address \
+// RUN:   -mtvos-simulator-version-min=8.3.0 %s -o %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-ASAN-TVOSSIM %s
 
 // CHECK-ASAN-TVOSSIM: "{{.*}}ld{{(.exe)?}}"
@@ -77,7 +78,8 @@
 // CHECK-ASAN-TVOSSIM: "-rpath" "{{.*}}lib{{.*}}darwin"
 
 // RUN: %clang -no-canonical-prefixes -### -target x86_64-darwin \
-// RUN:   -fsanitize=address -mwatchos-simulator-version-min=2.0.0 %s -o %t.o 2>&1 \
+// RUN:   -stdlib=platform -fsanitize=address \
+// RUN:   -mwatchos-simulator-version-min=2.0.0 %s -o %t.o 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-ASAN-WATCHOSSIM %s
 
 // CHECK-ASAN-WATCHOSSIM: "{{.*}}ld{{(.exe)?}}"
@@ -87,8 +89,8 @@
 // CHECK-ASAN-WATCHOSSIM: "-rpath" "{{.*}}lib{{.*}}darwin"
 
 // RUN: %clang -no-canonical-prefixes -### -target armv7-apple-ios  \
-// RUN:   -fsanitize=address -miphoneos-version-min=7 %s -o %t.o 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-ASAN-IOS %s
+// RUN:   -stdlib=platform -fsanitize=address -miphoneos-version-min=7 \
+// RUN:   %s -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-ASAN-IOS %s
 
 // CHECK-ASAN-IOS: "{{.*}}ld{{(.exe)?}}"
 // CHECK-ASAN-IOS: lc++
@@ -97,8 +99,8 @@
 // CHECK-ASAN-IOS: "-rpath" "{{.*}}lib{{.*}}darwin"
 
 // RUN: %clang -no-canonical-prefixes -### -target arm64-apple-tvos \
-// RUN:   -fsanitize=address -mtvos-version-min=8.3 %s -o %t.o 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-ASAN-TVOS %s
+// RUN:   -stdlib=platform -fsanitize=address -mtvos-version-min=8.3 \
+// RUN:   %s -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-ASAN-TVOS %s
 
 // CHECK-ASAN-TVOS: "{{.*}}ld{{(.exe)?}}"
 // CHECK-ASAN-TVOS: lc++
@@ -107,8 +109,8 @@
 // CHECK-ASAN-TVOS: "-rpath" "{{.*}}lib{{.*}}darwin"
 
 // RUN: %clang -no-canonical-prefixes -### -target armv7k-apple-watchos \
-// RUN:   -fsanitize=address -mwatchos-version-min=2.0 %s -o %t.o 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-ASAN-WATCHOS %s
+// RUN:   -stdlib=platform -fsanitize=address -mwatchos-version-min=2.0 \
+// RUN:   %s -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-ASAN-WATCHOS %s
 
 // CHECK-ASAN-WATCHOS: "{{.*}}ld{{(.exe)?}}"
 // CHECK-ASAN-WATCHOS: lc++

Modified: cfe/trunk/test/Driver/sanitizer-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/sanitizer-ld.c?rev=263435&r1=263434&r2=263435&view=diff
==============================================================================
--- cfe/trunk/test/Driver/sanitizer-ld.c (original)
+++ cfe/trunk/test/Driver/sanitizer-ld.c Mon Mar 14 09:34:10 2016
@@ -76,7 +76,7 @@
 // CHECK-ASAN-FREEBSD-LDL-NOT: "-ldl"
 
 // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN:     -target i386-unknown-linux -stdlib=libstdc++ -fsanitize=address \
+// RUN:     -target i386-unknown-linux -stdlib=platform -fsanitize=address \
 // RUN:     -resource-dir=%S/Inputs/empty_resource_dir \
 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-ASAN-LINUX-CXX %s
@@ -93,7 +93,7 @@
 // CHECK-ASAN-LINUX-CXX: "-ldl"
 
 // RUN: %clang -no-canonical-prefixes %s -### -o /dev/null -fsanitize=address \
-// RUN:     -target i386-unknown-linux -stdlib=libstdc++ \
+// RUN:     -target i386-unknown-linux -stdlib=platform \
 // RUN:     --sysroot=%S/Inputs/basic_linux_tree -lstdc++ -static 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-ASAN-LINUX-CXX-STATIC %s
 //
@@ -152,7 +152,7 @@
 // CHECK-ASAN-ANDROID-SHARED-NOT: "-lpthread"
 
 // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN:     -target x86_64-unknown-linux -stdlib=libstdc++ -lstdc++ \
+// RUN:     -target x86_64-unknown-linux -stdlib=platform -lstdc++ \
 // RUN:     -fsanitize=thread \
 // RUN:     -resource-dir=%S/Inputs/resource_dir \
 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
@@ -171,7 +171,7 @@
 // CHECK-TSAN-LINUX-CXX: "-ldl"
 
 // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN:     -target x86_64-unknown-linux -stdlib=libstdc++ -lstdc++ \
+// RUN:     -target x86_64-unknown-linux -stdlib=platform -lstdc++ \
 // RUN:     -fsanitize=memory \
 // RUN:     -resource-dir=%S/Inputs/resource_dir \
 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
@@ -211,7 +211,7 @@
 // CHECK-UBSAN-LINUX-LINK-CXX-NOT: "-lstdc++"
 
 // RUN: %clangxx -fsanitize=undefined %s -### -o %t.o 2>&1 \
-// RUN:     -target i386-unknown-linux -stdlib=libstdc++ \
+// RUN:     -target i386-unknown-linux -stdlib=platform \
 // RUN:     -resource-dir=%S/Inputs/resource_dir \
 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-UBSAN-LINUX-CXX %s
@@ -236,7 +236,7 @@
 // CHECK-ASAN-UBSAN-LINUX: "-lpthread"
 
 // RUN: %clangxx -fsanitize=address,undefined %s -### -o %t.o 2>&1 \
-// RUN:     -target i386-unknown-linux -stdlib=libstdc++ \
+// RUN:     -target i386-unknown-linux -stdlib=platform \
 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-ASAN-UBSAN-LINUX-CXX %s
 // CHECK-ASAN-UBSAN-LINUX-CXX: "{{.*}}ld{{(.exe)?}}"
@@ -329,7 +329,7 @@
 
 // RUN: %clangxx -fsanitize=address %s -### -o %t.o 2>&1 \
 // RUN:     -mmacosx-version-min=10.6 \
-// RUN:     -target x86_64-apple-darwin13.4.0 -stdlib=libstdc++ \
+// RUN:     -target x86_64-apple-darwin13.4.0 -stdlib=platform \
 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-ASAN-DARWIN106-CXX %s
 // CHECK-ASAN-DARWIN106-CXX: "{{.*}}ld{{(.exe)?}}"




More information about the cfe-commits mailing list