summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorMartell Malone <martellmalone@gmail.com>2015-08-14 18:00:09 +0000
committerMartell Malone <martellmalone@gmail.com>2015-08-14 18:00:09 +0000
commit7ccda3c38b5cd2bcc21487039ec8d354a9d30286 (patch)
tree663c6080cc783e3647a8071755844aa967f709aa /clang/lib
parented502905f7c285959c5555bc01f8af762dadb8d6 (diff)
downloadbcm5719-llvm-7ccda3c38b5cd2bcc21487039ec8d354a9d30286.tar.gz
bcm5719-llvm-7ccda3c38b5cd2bcc21487039ec8d354a9d30286.zip
Windows ARM: ignore calling conventions as described on MSDN
Summary: MSDN says that fastcall, stdcall, thiscall, and vectorcall are all accepted but ignored on ARM and X64. https://msdn.microsoft.com/en-us/library/984x0h58.aspx MSDN also says cdecl is also accepted and typically ignored This patch brings ARM in line with how we ignore them for X64 Reviewers: rnk Subscribers: compnerd, cfe-commits Differential Revision: http://reviews.llvm.org/D12034 llvm-svn: 245076
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Basic/Targets.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index f942eebdea9..8d1966e8f3d 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -4959,6 +4959,19 @@ public:
BuiltinVaListKind getBuiltinVaListKind() const override {
return TargetInfo::CharPtrBuiltinVaList;
}
+ CallingConvCheckResult checkCallingConvention(CallingConv CC) const override {
+ switch (CC) {
+ case CC_X86StdCall:
+ case CC_X86ThisCall:
+ case CC_X86FastCall:
+ case CC_X86VectorCall:
+ return CCCR_Ignore;
+ case CC_C:
+ return CCCR_OK;
+ default:
+ return CCCR_Warning;
+ }
+ }
};
// Windows ARM + Itanium C++ ABI Target
OpenPOWER on IntegriCloud