mirror of
https://github.com/intel/llvm.git
synced 2026-02-07 07:39:11 +08:00
Fix a crash during meta-data generation of objc2's nonfragile abi.
llvm-svn: 67402
This commit is contained in:
@@ -4193,7 +4193,10 @@ void CGObjCNonFragileABIMac::GenerateClass(const ObjCImplementationDecl *ID) {
|
||||
ID->getClassInterface()->getSuperClass()->getNameAsString();
|
||||
SuperClassGV = GetClassGlobal(ObjCClassName + RootClassName);
|
||||
}
|
||||
|
||||
// FIXME: Gross
|
||||
ObjCInterfaceDecl *Interface =
|
||||
const_cast<ObjCInterfaceDecl*>(ID->getClassInterface());
|
||||
CGM.getTypes().ConvertType(CGM.getContext().buildObjCInterfaceType(Interface));
|
||||
InstanceStart = InstanceSize = 0;
|
||||
if (ObjCInterfaceDecl *OID =
|
||||
const_cast<ObjCInterfaceDecl*>(ID->getClassInterface())) {
|
||||
|
||||
24
clang/test/CodeGenObjC/forward-class-impl-metadata.m
Normal file
24
clang/test/CodeGenObjC/forward-class-impl-metadata.m
Normal file
@@ -0,0 +1,24 @@
|
||||
// RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s
|
||||
|
||||
@interface BASE {
|
||||
@private
|
||||
void* _reserved;
|
||||
}
|
||||
@end
|
||||
|
||||
@class PVR;
|
||||
|
||||
@interface PVRHandldler
|
||||
{
|
||||
PVR *_imageBrowser;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation PVRHandldler @end
|
||||
|
||||
|
||||
@interface PVR : BASE
|
||||
@end
|
||||
|
||||
@implementation PVR
|
||||
@end
|
||||
Reference in New Issue
Block a user