diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-23 20:40:50 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-23 20:40:50 +0000 |
commit | 60bce3ef20a4c9684e3825cdd739fefb9810327d (patch) | |
tree | 0aea7bd3cd7243f3ed322a657ba16cfe04937787 /lib/AST/ASTContext.cpp | |
parent | bc0e0781da778bd5eb41a810419912893ae20448 (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.cpp | 9 |
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 |