aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-22 08:08:35 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-22 08:08:35 +0000
commitb897c8660c4ff7037dde81b9645737bc1c992abe (patch)
treeb6403365e77095a79062d3379c9e6aea0df5f088 /test/CodeGen
parent7ef7bab7e3d06f660b059b903c231f100bb13cc5 (diff)
downloadsrc-b897c8660c4ff7037dde81b9645737bc1c992abe.tar.gz
src-b897c8660c4ff7037dde81b9645737bc1c992abe.zip
Update Clang sources to r73879.vendor/clang/clang-r73879
Notes
Notes: svn path=/vendor/clang/dist/; revision=194613 svn path=/vendor/clang/clang-r73879/; revision=194615; tag=vendor/clang/clang-r73879
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/2009-05-22-callingconv.c2
-rw-r--r--test/CodeGen/2009-06-14-anonymous-union-init.c7
-rw-r--r--test/CodeGen/2009-06-16-inc_test.c3
-rw-r--r--test/CodeGen/2009-06-16-test.c15
-rw-r--r--test/CodeGen/call-knr-indirect.c11
-rw-r--r--test/CodeGen/libcalls.c4
6 files changed, 39 insertions, 3 deletions
diff --git a/test/CodeGen/2009-05-22-callingconv.c b/test/CodeGen/2009-05-22-callingconv.c
index 2b70d840c061..8afc656843ea 100644
--- a/test/CodeGen/2009-05-22-callingconv.c
+++ b/test/CodeGen/2009-05-22-callingconv.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -emit-llvm -o - | grep call | grep x86_stdcallcc
+// RUN: clang-cc %s -emit-llvm -o - -triple i386-unknown-unknown | grep call | grep x86_stdcallcc
void abort(void) __attribute__((__noreturn__));
typedef void re_string_t;
typedef void re_dfa_t;
diff --git a/test/CodeGen/2009-06-14-anonymous-union-init.c b/test/CodeGen/2009-06-14-anonymous-union-init.c
new file mode 100644
index 000000000000..8d1831a4f3ce
--- /dev/null
+++ b/test/CodeGen/2009-06-14-anonymous-union-init.c
@@ -0,0 +1,7 @@
+// RUN: clang-cc -emit-llvm < %s | grep "zeroinitializer, i16 16877"
+// PR4390
+struct sysfs_dirent {
+ union { struct sysfs_elem_dir {} s_dir; };
+ unsigned short s_mode;
+};
+struct sysfs_dirent sysfs_root = { {}, 16877 };
diff --git a/test/CodeGen/2009-06-16-inc_test.c b/test/CodeGen/2009-06-16-inc_test.c
new file mode 100644
index 000000000000..b28f63a1c580
--- /dev/null
+++ b/test/CodeGen/2009-06-16-inc_test.c
@@ -0,0 +1,3 @@
+// RUN: clang -c -g %s -o /dev/null
+// PR 4228
+#include "2009-06-16-test.c"
diff --git a/test/CodeGen/2009-06-16-test.c b/test/CodeGen/2009-06-16-test.c
new file mode 100644
index 000000000000..4189d06812af
--- /dev/null
+++ b/test/CodeGen/2009-06-16-test.c
@@ -0,0 +1,15 @@
+
+#ifndef TEST
+#define TEST
+#define INSIDE_RECURSION
+#include "2009-06-16-test.c"
+#undef INSIDE_RECURSION
+#endif
+
+#ifndef INSIDE_RECURSION
+int i;
+#endif
+
+#ifdef INSIDE_RECURSION
+int j;
+#endif
diff --git a/test/CodeGen/call-knr-indirect.c b/test/CodeGen/call-knr-indirect.c
new file mode 100644
index 000000000000..17be015bffb1
--- /dev/null
+++ b/test/CodeGen/call-knr-indirect.c
@@ -0,0 +1,11 @@
+// RUN: clang %s -O0 -emit-llvm -S -o - | grep 'call.*rb_define_global_function'
+// This should call rb_define_global_function, not rb_f_chop.
+
+void rb_define_global_function (const char*,void(*)(),int);
+static void rb_f_chop();
+void Init_String() {
+ rb_define_global_function("chop", rb_f_chop, 0);
+}
+static void rb_f_chop() {
+}
+
diff --git a/test/CodeGen/libcalls.c b/test/CodeGen/libcalls.c
index 695321622fed..ea9e0c3dd91b 100644
--- a/test/CodeGen/libcalls.c
+++ b/test/CodeGen/libcalls.c
@@ -1,7 +1,7 @@
-// RUN: clang-cc -fmath-errno=1 -emit-llvm -o %t %s &&
+// RUN: clang-cc -fmath-errno=1 -emit-llvm -o %t %s -triple i386-unknown-unknown &&
// RUN: grep "declare " %t | count 6 &&
// RUN: grep "declare " %t | grep "@llvm." | count 1 &&
-// RUN: clang-cc -fmath-errno=0 -emit-llvm -o %t %s &&
+// RUN: clang-cc -fmath-errno=0 -emit-llvm -o %t %s -triple i386-unknown-unknown &&
// RUN: grep "declare " %t | count 6 &&
// RUN: grep "declare " %t | grep -v "@llvm." | count 0