aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
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");