aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-11-23 20:40:50 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-11-23 20:40:50 +0000
commit60bce3ef20a4c9684e3825cdd739fefb9810327d (patch)
tree0aea7bd3cd7243f3ed322a657ba16cfe04937787 /lib/AST/ASTContext.cpp
parentbc0e0781da778bd5eb41a810419912893ae20448 (diff)
Fixe a crash in encoding of SEL type caused by recent changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89696 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 7422ca8597..dd9fce90e0 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -3396,6 +3396,11 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
false);
return;
}
+
+ if (isObjCSelType(T)) {
+ S += ':';
+ return;
+ }
if (const PointerType *PT = T->getAs<PointerType>()) {
QualType PointeeTy = PT->getPointeeType();
@@ -3429,10 +3434,6 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
S.replace(S.end()-2, S.end(), replace);
}
}
- if (isObjCSelType(PointeeTy)) {
- S += ':';
- return;
- }
if (PointeeTy->isCharType()) {
// char pointer types should be encoded as '*' unless it is a