diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-29 22:54:56 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-29 22:54:56 +0000 |
commit | 271b8d43cea23d669e6a53410a94a4f948bfde36 (patch) | |
tree | c088f77758f2c37e035bb42dd9bbb7bf6f1c29ba /clang/lib/AST/ASTContext.cpp | |
parent | 7b12b87096da8816ddde73f72a46dae4d001f380 (diff) | |
download | bcm5719-llvm-271b8d43cea23d669e6a53410a94a4f948bfde36.tar.gz bcm5719-llvm-271b8d43cea23d669e6a53410a94a4f948bfde36.zip |
objective-c IRGen: fixes a crash when method type is being mangled
when an argument type size is 0. // rdar://11777609, PR13229
llvm-svn: 159472
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index f208f06111e..916e7d796fb 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -4190,8 +4190,8 @@ bool ASTContext::getObjCEncodingForFunctionDecl(const FunctionDecl *Decl, QualType PType = (*PI)->getType(); CharUnits sz = getObjCEncodingTypeSize(PType); if (sz.isZero()) - return true; - + continue; + assert (sz.isPositive() && "getObjCEncodingForFunctionDecl - Incomplete param type"); ParmOffset += sz; @@ -4259,8 +4259,8 @@ bool ASTContext::getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl, QualType PType = (*PI)->getType(); CharUnits sz = getObjCEncodingTypeSize(PType); if (sz.isZero()) - return true; - + continue; + assert (sz.isPositive() && "getObjCEncodingForMethodDecl - Incomplete param type"); ParmOffset += sz; |