Zero arg varargs functions are legal in LLVM, but not in C.
authorChris Lattner <sabre@nondot.org>
Thu, 23 Oct 2003 17:31:33 +0000 (17:31 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 23 Oct 2003 17:31:33 +0000 (17:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9425 91177308-0d34-0410-b5e6-96231b3b80d8

test/CBackend/2003-10-23-ZeroArgVarargs.ll [new file with mode: 0644]
test/CodeGen/CBackend/2003-10-23-ZeroArgVarargs.ll [new file with mode: 0644]

diff --git a/test/CBackend/2003-10-23-ZeroArgVarargs.ll b/test/CBackend/2003-10-23-ZeroArgVarargs.ll
new file mode 100644 (file)
index 0000000..4ba9741
--- /dev/null
@@ -0,0 +1,9 @@
+
+declare sbyte* %llvm.va_start()
+declare void %llvm.va_end(sbyte*)
+
+void %test(...) {
+       %P = call sbyte* %llvm.va_start()
+       call void %llvm.va_end(sbyte* %P)
+       ret void
+}
diff --git a/test/CodeGen/CBackend/2003-10-23-ZeroArgVarargs.ll b/test/CodeGen/CBackend/2003-10-23-ZeroArgVarargs.ll
new file mode 100644 (file)
index 0000000..4ba9741
--- /dev/null
@@ -0,0 +1,9 @@
+
+declare sbyte* %llvm.va_start()
+declare void %llvm.va_end(sbyte*)
+
+void %test(...) {
+       %P = call sbyte* %llvm.va_start()
+       call void %llvm.va_end(sbyte* %P)
+       ret void
+}