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
diff --git a/test/CodeGen/functions.c b/test/CodeGen/functions.c
index 83da647..ad91826 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 @@
 
 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() {}