diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-05 08:30:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-05 08:30:04 +0000 |
commit | ded98d4172369be398f3206ad9414ae26e8355ae (patch) | |
tree | 7bcd0b2fb5779c5e6a441f994fa0a36b7fee9393 /clang | |
parent | e99c110d06545a8051c5fe47b844ed7fc1bfb96f (diff) | |
download | bcm5719-llvm-ded98d4172369be398f3206ad9414ae26e8355ae.tar.gz bcm5719-llvm-ded98d4172369be398f3206ad9414ae26e8355ae.zip |
consolidate some tests.
llvm-svn: 90659
Diffstat (limited to 'clang')
-rw-r--r-- | clang/test/CodeGen/cast-to-union.c | 13 | ||||
-rw-r--r-- | clang/test/CodeGen/decl.c | 23 | ||||
-rw-r--r-- | clang/test/CodeGen/string-init.c | 10 |
3 files changed, 23 insertions, 23 deletions
diff --git a/clang/test/CodeGen/cast-to-union.c b/clang/test/CodeGen/cast-to-union.c deleted file mode 100644 index b1019da0a37..00000000000 --- a/clang/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/clang/test/CodeGen/decl.c b/clang/test/CodeGen/decl.c index b26843132c2..b13000a48c5 100644 --- a/clang/test/CodeGen/decl.c +++ b/clang/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/clang/test/CodeGen/string-init.c b/clang/test/CodeGen/string-init.c deleted file mode 100644 index 410a4072825..00000000000 --- a/clang/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" }; -} - |