aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-01 23:31:26 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-01 23:31:26 +0000
commit4581581881d3f7349bf5a4b39d761bce688f9164 (patch)
tree65c789fd2f02bd959f78cb81362ba367eb756a81 /lib/CodeGen/TargetInfo.cpp
parent4cc753f4503931763cfb762a95928b44fcbe64e9 (diff)
ARM/APCS: Fix classification of small complex integer types as "integer like".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r--lib/CodeGen/TargetInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index c0b5f655fa..07f116a0e0 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -1585,9 +1585,9 @@ static bool isIntegerLikeType(QualType Ty,
if (Ty->getAs<BuiltinType>() || Ty->isPointerType())
return true;
- // Complex types "should" be ok by the definition above, but they are not.
- if (Ty->isAnyComplexType())
- return false;
+ // Small complex integer types are "integer like".
+ if (const ComplexType *CT = Ty->getAs<ComplexType>())
+ return isIntegerLikeType(CT->getElementType(), Context, VMContext);
// Single element and zero sized arrays should be allowed, by the definition
// above, but they are not.