From: Chris Lattner Date: Sat, 5 Dec 2009 08:30:04 +0000 (+0000) Subject: consolidate some tests. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36a2be162dda758e55d6605ef712494fe09ef432;p=clang consolidate some tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90659 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 @@ -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" }; -} -