forked from OSchip/llvm-project
When performing layout for an Objective-C class, make sure to dig out
the definition of that class. Fixes PR11613 / <rdar://problem/10604077>. llvm-svn: 146976
This commit is contained in:
parent
ec7e6e0946
commit
64d9257e38
|
@ -2161,7 +2161,9 @@ const CXXMethodDecl *ASTContext::getKeyFunction(const CXXRecordDecl *RD) {
|
|||
const ASTRecordLayout &
|
||||
ASTContext::getObjCLayout(const ObjCInterfaceDecl *D,
|
||||
const ObjCImplementationDecl *Impl) const {
|
||||
assert(D->isThisDeclarationADefinition() && "Invalid interface decl!");
|
||||
// Retrieve the definition
|
||||
D = D->getDefinition();
|
||||
assert(D && D->isThisDeclarationADefinition() && "Invalid interface decl!");
|
||||
|
||||
// Look up this layout, if already laid out, return what we have.
|
||||
ObjCContainerDecl *Key =
|
||||
|
|
|
@ -39,3 +39,9 @@ int f0(A *a) {
|
|||
@implementation A
|
||||
@synthesize p0 = _p0;
|
||||
@end
|
||||
|
||||
@interface B
|
||||
@end
|
||||
@class B;
|
||||
@implementation B
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue