Ensure builtins use the target default Calling Convention
authorErich Keane <erich.keane@intel.com>
Thu, 23 May 2019 16:05:21 +0000 (16:05 +0000)
committerErich Keane <erich.keane@intel.com>
Thu, 23 May 2019 16:05:21 +0000 (16:05 +0000)
commit000228183bf17a0f64afccdda35867553c9b75f6
tree8e8ea65aad6c020c506a8cc0423c58c64eada1c0
parent6aebd8394a2bb9e514d0eaf8c8124b79974a2ba8
Ensure builtins use the target default Calling Convention

r355317 changed builtins/allocation functions to use the default calling
convention in order to support platforms that use non-cdecl calling
conventions by default.

However the default calling convention is overridable on Windows 32 bit
implementations with some of the /G options. The intent is to permit the
user to set the calling convention of normal functions, however it
should NOT apply to builtins and C++ allocation functions.

This patch ensures that the builtin/allocation functions always use the
Target specific Calling Convention, ignoring the user overridden version
of said default.

llvm-svn: 361507
clang/include/clang/AST/ASTContext.h
clang/lib/AST/ASTContext.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/test/CodeGenCXX/builtin-calling-conv.cpp