aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorChris Bowler <cebowleratibm@gmail.com>2020-09-25 07:36:49 -0400
committerZarko Todorovski <zarko@ca.ibm.com>2020-09-25 07:43:31 -0400
commitf330d9f163f644b968c6aa5884dc1be5efda20a1 (patch)
treeb2bf2c6aaca2ddc461a8b8d2a44dd8678a41b13e /clang/lib/CodeGen/TargetInfo.cpp
parent852447650c75de5f3e9c53a2659589cd2fd36b4d (diff)
downloadllvm-f330d9f163f644b968c6aa5884dc1be5efda20a1.zip
llvm-f330d9f163f644b968c6aa5884dc1be5efda20a1.tar.gz
llvm-f330d9f163f644b968c6aa5884dc1be5efda20a1.tar.bz2
[PPC] [AIX] Implement calling convention IR for C99 complex types on AIX
Add AIX calling convention logic to Clang for C99 complex types on AIX Differential Revision: https://reviews.llvm.org/D88130
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 2f3f4c2..6e15cac 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -4504,7 +4504,7 @@ bool AIXABIInfo::isPromotableTypeForABI(QualType Ty) const {
ABIArgInfo AIXABIInfo::classifyReturnType(QualType RetTy) const {
if (RetTy->isAnyComplexType())
- llvm::report_fatal_error("complex type is not supported on AIX yet");
+ return ABIArgInfo::getDirect();
if (RetTy->isVectorType())
llvm::report_fatal_error("vector type is not supported on AIX yet");
@@ -4525,7 +4525,7 @@ ABIArgInfo AIXABIInfo::classifyArgumentType(QualType Ty) const {
Ty = useFirstFieldIfTransparentUnion(Ty);
if (Ty->isAnyComplexType())
- llvm::report_fatal_error("complex type is not supported on AIX yet");
+ return ABIArgInfo::getDirect();
if (Ty->isVectorType())
llvm::report_fatal_error("vector type is not supported on AIX yet");
@@ -4550,8 +4550,9 @@ ABIArgInfo AIXABIInfo::classifyArgumentType(QualType Ty) const {
}
CharUnits AIXABIInfo::getParamTypeAlignment(QualType Ty) const {
- if (Ty->isAnyComplexType())
- llvm::report_fatal_error("complex type is not supported on AIX yet");
+ // Complex types are passed just like their elements.
+ if (const ComplexType *CTy = Ty->getAs<ComplexType>())
+ Ty = CTy->getElementType();
if (Ty->isVectorType())
llvm::report_fatal_error("vector type is not supported on AIX yet");