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 | d25c2194757f92a20ced4fe8f8833894ac5dab4e (patch) | |
tree | 36373255277ae97828ff548c997a47c2b04a6102 /clang/lib/AST | |
parent | 50b293d65e6d27da95a9b89a622ae68235ecb636 (diff) | |
download | bcm5719-llvm-d25c2194757f92a20ced4fe8f8833894ac5dab4e.tar.gz bcm5719-llvm-d25c2194757f92a20ced4fe8f8833894ac5dab4e.zip |
Fixe a crash in encoding of SEL type caused by recent changes.
llvm-svn: 89696
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 7422ca85973..dd9fce90e03 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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 |