diff options
author | Erich Keane <erich.keane@intel.com> | 2017-10-24 23:12:01 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2017-10-24 23:12:01 +0000 |
commit | 5759fa798bcc4291f54e51f960dcfc49972d7f00 (patch) | |
tree | 11884257b9a471aa3fdbe94f5f8b86d02de16ed9 /clang/test/CodeGenCXX/default_calling_conv.cpp | |
parent | 562962f2131792368b41eb46a12bb0e0c3f4e8e6 (diff) | |
download | bcm5719-llvm-5759fa798bcc4291f54e51f960dcfc49972d7f00.tar.gz bcm5719-llvm-5759fa798bcc4291f54e51f960dcfc49972d7f00.zip |
Correct behavior of fastcall when default CC is set.
Fastcall doesn't support variadic function calls, so
setting the default calling convention to Fastcall would
result in incorrect code being emitted for these conditions.
This patch adds a 'variadic' test to the default calling conv
test, as well as fixes the behavior of fastcall.
llvm-svn: 316528
Diffstat (limited to 'clang/test/CodeGenCXX/default_calling_conv.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/default_calling_conv.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/default_calling_conv.cpp b/clang/test/CodeGenCXX/default_calling_conv.cpp index 95c214a223d..15eedc8e318 100644 --- a/clang/test/CodeGenCXX/default_calling_conv.cpp +++ b/clang/test/CodeGenCXX/default_calling_conv.cpp @@ -10,6 +10,13 @@ // VECTORCALL: define x86_vectorcallcc void @_Z5test1v void test1() {} +// fastcall, stdcall, and vectorcall all do not support variadic functions. +// CDECL: define void @_Z12testVariadicz +// FASTCALL: define void @_Z12testVariadicz +// STDCALL: define void @_Z12testVariadicz +// VECTORCALL: define void @_Z12testVariadicz +void testVariadic(...){} + // ALL: define void @_Z5test2v void __attribute__((cdecl)) test2() {} |