[cfe-commits] r39829 - in /cfe/trunk/test/CodeGen: ./ conditional.c int-to-pointer.c

Chris Lattner sabre at nondot.org
Fri Jul 13 13:18:44 PDT 2007


Author: lattner
Date: Fri Jul 13 15:18:44 2007
New Revision: 39829

URL: http://llvm.org/viewvc/llvm-project?rev=39829&view=rev
Log:
Check in these testcases.

Added:
    cfe/trunk/test/CodeGen/
    cfe/trunk/test/CodeGen/conditional.c
    cfe/trunk/test/CodeGen/int-to-pointer.c

Added: cfe/trunk/test/CodeGen/conditional.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/conditional.c?rev=39829&view=auto

==============================================================================
--- cfe/trunk/test/CodeGen/conditional.c (added)
+++ cfe/trunk/test/CodeGen/conditional.c Fri Jul 13 15:18:44 2007
@@ -0,0 +1,12 @@
+// RUN: clang -emit-llvm %s
+
+float test1(int cond, float a, float b)
+{
+  return cond ? a : b;
+}
+/* this will fail for now...
+double test2(int cond, float a, double b)
+{
+  return cond ? a : b;
+}
+*/

Added: cfe/trunk/test/CodeGen/int-to-pointer.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/int-to-pointer.c?rev=39829&view=auto

==============================================================================
--- cfe/trunk/test/CodeGen/int-to-pointer.c (added)
+++ cfe/trunk/test/CodeGen/int-to-pointer.c Fri Jul 13 15:18:44 2007
@@ -0,0 +1,6 @@
+// RUN: clang -emit-llvm %s
+
+void *test(int i)
+{
+  return (void *)i;
+}





More information about the cfe-commits mailing list