aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-04-09 21:55:45 +0000
committerAnders Carlsson <andersca@mac.com>2009-04-09 21:55:45 +0000
commitc612f7bc9a6379cd7e7c2dd306d05938e890051b (patch)
treecba4f74e7a7fb8aeecf556cb1578242ea7212800 /lib
parent6ab3524f72a6e64aa04973fa9433b5559abb3525 (diff)
Add @encode support for complex types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTContext.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index e976ccf967..deeb763191 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -2266,8 +2266,11 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
S += encoding;
}
- }
- else if (T->isObjCQualifiedIdType()) {
+ } else if (const ComplexType *CT = T->getAsComplexType()) {
+ S += 'j';
+ getObjCEncodingForTypeImpl(CT->getElementType(), S, false, false, 0, false,
+ false);
+ } else if (T->isObjCQualifiedIdType()) {
getObjCEncodingForTypeImpl(getObjCIdType(), S,
ExpandPointedToStructures,
ExpandStructures, FD);