aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/CodeGen/cast-to-union.c13
-rw-r--r--test/CodeGen/decl.c23
-rw-r--r--test/CodeGen/string-init.c10
3 files changed, 23 insertions, 23 deletions
diff --git a/test/CodeGen/cast-to-union.c b/test/CodeGen/cast-to-union.c
deleted file mode 100644
index b1019da0a3..0000000000
--- a/test/CodeGen/cast-to-union.c
+++ /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;
diff --git a/test/CodeGen/decl.c b/test/CodeGen/decl.c
index b26843132c..b13000a48c 100644
--- a/test/CodeGen/decl.c
+++ b/test/CodeGen/decl.c
@@ -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
index 410a407282..0000000000
--- a/test/CodeGen/string-init.c
+++ /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" };
-}
-