[cfe-commits] r167306 - /cfe/trunk/test/Driver/ubsan-ld.c

Richard Smith richard-llvm at metafoo.co.uk
Fri Nov 2 13:34:30 PDT 2012


Author: rsmith
Date: Fri Nov  2 15:34:30 2012
New Revision: 167306

URL: http://llvm.org/viewvc/llvm-project?rev=167306&view=rev
Log:
Add test for link flags added by -fcatch-undefined-behavior.

Added:
    cfe/trunk/test/Driver/ubsan-ld.c

Added: cfe/trunk/test/Driver/ubsan-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/ubsan-ld.c?rev=167306&view=auto
==============================================================================
--- cfe/trunk/test/Driver/ubsan-ld.c (added)
+++ cfe/trunk/test/Driver/ubsan-ld.c Fri Nov  2 15:34:30 2012
@@ -0,0 +1,10 @@
+// Test UndefinedBehaviorSanitizer ld flags.
+
+// RUN: %clang -fcatch-undefined-behavior %s -### -o %t.o 2>&1 \
+// RUN:     -target i386-unknown-linux \
+// RUN:     --sysroot=%S/Inputs/basic_linux_tree \
+// RUN:   | FileCheck --check-prefix=CHECK-LINUX %s
+// CHECK-LINUX: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LINUX-NOT: "-lc"
+// CHECK-LINUX: libclang_rt.ubsan-i386.a"
+// CHECK-LINUX: "-lpthread"





More information about the cfe-commits mailing list