summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-06-29 22:54:56 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-06-29 22:54:56 +0000
commit271b8d43cea23d669e6a53410a94a4f948bfde36 (patch)
treec088f77758f2c37e035bb42dd9bbb7bf6f1c29ba /clang/lib/AST/ASTContext.cpp
parent7b12b87096da8816ddde73f72a46dae4d001f380 (diff)
downloadbcm5719-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.cpp8
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;
OpenPOWER on IntegriCloud