]> granicus.if.org Git - clang/commit
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)
commitdd43cfced871556930bf258c325bc29e88ca932c
tree2acb1e35bad8abf0e7dd16985025bb0dc596ceb5
parent7ed9c794b8e647aa3bb18f5f035e355a9a9d0155
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361507 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTContext.h
lib/AST/ASTContext.cpp
lib/Sema/SemaExprCXX.cpp
test/CodeGenCXX/builtin-calling-conv.cpp