[cfe-commits] r90659 - in /cfe/trunk/test/CodeGen: cast-to-union.c decl.c string-init.c
Chris Lattner
sabre at nondot.org
Sat Dec 5 00:30:04 PST 2009
Author: lattner
Date: Sat Dec 5 02:30:04 2009
New Revision: 90659
URL: http://llvm.org/viewvc/llvm-project?rev=90659&view=rev
Log:
consolidate some tests.
Removed:
cfe/trunk/test/CodeGen/cast-to-union.c
cfe/trunk/test/CodeGen/string-init.c
Modified:
cfe/trunk/test/CodeGen/decl.c
Removed: cfe/trunk/test/CodeGen/cast-to-union.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/cast-to-union.c?rev=90658&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/cast-to-union.c (original)
+++ cfe/trunk/test/CodeGen/cast-to-union.c (removed)
@@ -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;
Modified: cfe/trunk/test/CodeGen/decl.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/decl.c?rev=90659&r1=90658&r2=90659&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/decl.c (original)
+++ cfe/trunk/test/CodeGen/decl.c Sat Dec 5 02:30:04 2009
@@ -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 @@
// 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;
+
Removed: cfe/trunk/test/CodeGen/string-init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/string-init.c?rev=90658&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/string-init.c (original)
+++ cfe/trunk/test/CodeGen/string-init.c (removed)
@@ -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" };
-}
-
More information about the cfe-commits
mailing list