diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-22 04:47:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-22 04:47:09 +0000 |
commit | 3e630653ad1905a2318cfbb0903d5a2414e96c0f (patch) | |
tree | 18c4444619244544e2b4dc3376d271272c0d4db2 /llvm/test/FrontendC++/varargs.cpp | |
parent | 2300f65e8c3964afbb0151fe37a4a8706fb1fbb8 (diff) | |
download | bcm5719-llvm-3e630653ad1905a2318cfbb0903d5a2414e96c0f.tar.gz bcm5719-llvm-3e630653ad1905a2318cfbb0903d5a2414e96c0f.zip |
testcase for PR4678 & rdar://7309675
llvm-svn: 84830
Diffstat (limited to 'llvm/test/FrontendC++/varargs.cpp')
-rw-r--r-- | llvm/test/FrontendC++/varargs.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/FrontendC++/varargs.cpp b/llvm/test/FrontendC++/varargs.cpp new file mode 100644 index 00000000000..1c07aedd093 --- /dev/null +++ b/llvm/test/FrontendC++/varargs.cpp @@ -0,0 +1,19 @@ +// RUN: %llvmgxx -S -emit-llvm %s -o - | FileCheck %s +// rdar://7309675 +// PR4678 + +// test1 should be compmiled to be a varargs function in the IR even +// though there is no way to do a va_begin. Otherwise, the optimizer +// will warn about 'dropped arguments' at the call site. + +// CHECK: define i32 @_Z5test1z(...) +int test1(...) { + return -1; +} + +// CHECK: call i32 (...)* @_Z5test1z(i32 0) +void test() { + test1(0); +} + + |