Fixe a crash in encoding of SEL type caused by recent changes.

llvm-svn: 89696
This commit is contained in:
Fariborz Jahanian 2009-11-23 20:40:50 +00:00
parent 50b293d65e
commit d25c219475
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -68,10 +68,12 @@ struct Innermost {
int ivar;
}
-(void) test3: (Test* [3] [4])b ;
- (SEL**) meth : (SEL) arg : (SEL*****) arg1 : (SEL*)arg2 : (SEL**) arg3;
@end
@implementation Test
-(void) test3: (Test* [3] [4])b {}
- (SEL**) meth : (SEL) arg : (SEL*****) arg1 : (SEL*)arg2 : (SEL**) arg3 {}
@end
struct S { int iS; };