aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/functions.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-19 07:15:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-19 07:15:39 +0000
commitd5d31801fc87239436fa349c89dce7797cf13537 (patch)
treee76bc0384471e0b92201a366b7a8af7acee631e0 /test/CodeGen/functions.c
parentafa74448a07a16c3146accbe0ff03e9c8b0995e5 (diff)
Don't emit K&R unprototyped function definitions as varargs.
- <rdar://problem/6584606> clang/x86-64 - too many reg saves git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/functions.c')
-rw-r--r--test/CodeGen/functions.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/CodeGen/functions.c b/test/CodeGen/functions.c
index 83da64704b..ad918263c5 100644
--- a/test/CodeGen/functions.c
+++ b/test/CodeGen/functions.c
@@ -1,4 +1,5 @@
-// RUN: clang %s -emit-llvm -o -
+// RUN: clang %s -emit-llvm -o %t &&
+
int g();
int foo(int i) {
@@ -17,3 +18,14 @@ void test3(T f) {
int a(int);
int a() {return 1;}
+
+// RUN: grep 'define void @f0()' %t &&
+void f0() {}
+
+void f1();
+// RUN: grep 'call void (...)\* bitcast (void ()\* @f1' %t &&
+void f2(void) {
+ f1(1, 2, 3);
+}
+// RUN: grep 'define void @f1()' %t
+void f1() {}