summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorSunil Srivastava <sunil_srivastava@playstation.sony.com>2019-07-19 21:38:34 +0000
committerSunil Srivastava <sunil_srivastava@playstation.sony.com>2019-07-19 21:38:34 +0000
commitf4038e75d20257742063826fd0adc2971b3e2367 (patch)
tree26a9ed304ebcde3dfb9fe1212d43101d33bdfd13 /clang/lib/Sema
parent7b5a54e369035a5754be2e836b7b583b3db8c884 (diff)
downloadbcm5719-llvm-f4038e75d20257742063826fd0adc2971b3e2367.tar.gz
bcm5719-llvm-f4038e75d20257742063826fd0adc2971b3e2367.zip
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
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index ee06f8ae511..5f0b3697d3d 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -4668,6 +4668,11 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC,
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;
OpenPOWER on IntegriCloud