From: Chris Lattner Date: Thu, 23 Oct 2003 17:31:33 +0000 (+0000) Subject: Zero arg varargs functions are legal in LLVM, but not in C. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=eea7cca3663393bc218089139ec8df6302863203;p=oota-llvm.git Zero arg varargs functions are legal in LLVM, but not in C. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9425 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CBackend/2003-10-23-ZeroArgVarargs.ll b/test/CBackend/2003-10-23-ZeroArgVarargs.ll new file mode 100644 index 00000000000..4ba97411f02 --- /dev/null +++ b/test/CBackend/2003-10-23-ZeroArgVarargs.ll @@ -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 index 00000000000..4ba97411f02 --- /dev/null +++ b/test/CodeGen/CBackend/2003-10-23-ZeroArgVarargs.ll @@ -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 +}