]> granicus.if.org Git - clang/commitdiff
consolidate some tests.
authorChris Lattner <sabre@nondot.org>
Sat, 5 Dec 2009 08:30:04 +0000 (08:30 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 5 Dec 2009 08:30:04 +0000 (08:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90659 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/cast-to-union.c [deleted file]
test/CodeGen/decl.c
test/CodeGen/string-init.c [deleted file]

diff --git a/test/CodeGen/cast-to-union.c b/test/CodeGen/cast-to-union.c
deleted file mode 100644 (file)
index b1019da..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: clang-cc -emit-llvm  %s -o - | FileCheck %s
-// CHECK: w = global %0 { i32 2, [4 x i8] undef }
-// CHECK: y = global %union.u { double 7.300000e+0{{[0]*}}1 }
-
-union u { int i; double d; };
-
-void foo() {
-  union u ola = (union u) 351;
-  union u olb = (union u) 1.0;
-}
-
-union u w = (union u)2;
-union u y = (union u)73.0;
index b26843132c2fdb257df3965945431d0fd85c7e73..b13000a48c53d428defd4749d206785b4f6c1fd4 100644 (file)
@@ -2,6 +2,8 @@
 
 // CHECK: @test1.x = internal constant [12 x i32] [i32 1
 // CHECK: @test2.x = internal constant [13 x i32] [i32 1,
+// CHECK: @test5w = global %0 { i32 2, [4 x i8] undef }
+// CHECK: @test5y = global %union.test5u { double 7.300000e+0{{[0]*}}1 }
 
 #include <string.h>
 
@@ -38,3 +40,24 @@ void test3() {
   // CHECK: call void @llvm.memset
 }
 
+void test4(void) {
+  char a[10] = "asdf";
+  char b[10] = { "asdf" };
+  // CHECK: @test4()
+  // CHECK: %a = alloca [10 x i8]
+  // CHECK: %b = alloca [10 x i8]
+  // CHECK: call void @llvm.memcpy
+  // CHECK: call void @llvm.memcpy
+}
+
+
+union test5u { int i; double d; };
+
+void test5() {
+  union test5u ola = (union test5u) 351;
+  union test5u olb = (union test5u) 1.0;
+}
+
+union test5u test5w = (union test5u)2;
+union test5u test5y = (union test5u)73.0;
+
diff --git a/test/CodeGen/string-init.c b/test/CodeGen/string-init.c
deleted file mode 100644 (file)
index 410a407..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: clang-cc -emit-llvm %s -o %t
-// RUN: grep 'internal constant \[10 x i8\]' %t
-// RUN: not grep -F "[5 x i8]" %t
-// RUN: not grep "store " %t
-
-void test(void) {
-  char a[10] = "asdf";
-  char b[10] = { "asdf" };
-}
-