Disallow most calling convention attributes on PS4
PS4 now only allows "cdecl", and its equivalent on PS4, "sysv_abi".
Differential Revision: https://reviews.llvm.org/D64780
llvm-svn: 366617
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index ee06f8a..5f0b369 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -4668,6 +4668,11 @@
CC = CC_C;
break;
+ case TargetInfo::CCCR_Error:
+ Diag(Attrs.getLoc(), diag::error_cconv_unsupported)
+ << Attrs << (int)CallingConventionIgnoredReason::ForThisTarget;
+ break;
+
case TargetInfo::CCCR_Warning: {
Diag(Attrs.getLoc(), diag::warn_cconv_unsupported)
<< Attrs << (int)CallingConventionIgnoredReason::ForThisTarget;