When importing an ObjCInterfaceDecl, ensure that
superclass information is imported before validating it. This fixes spurious "incompatible superclasses" errors in LLDB. llvm-svn: 144393
This commit is contained in:
parent
c391f7ff64
commit
45e1328f3f
|
@ -3220,6 +3220,17 @@ Decl *ASTNodeImporter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
|
|||
|
||||
// Check for consistency of superclasses.
|
||||
DeclarationName FromSuperName, ToSuperName;
|
||||
|
||||
// If the superclass hasn't been imported yet, do so before checking.
|
||||
ObjCInterfaceDecl *DSuperClass = D->getSuperClass();
|
||||
ObjCInterfaceDecl *ToIfaceSuperClass = ToIface->getSuperClass();
|
||||
|
||||
if (DSuperClass && !ToIfaceSuperClass) {
|
||||
Decl *ImportedSuperClass = Importer.Import(DSuperClass);
|
||||
ObjCInterfaceDecl *ImportedSuperIface = cast<ObjCInterfaceDecl>(ImportedSuperClass);
|
||||
ToIface->setSuperClass(ImportedSuperIface);
|
||||
}
|
||||
|
||||
if (D->getSuperClass())
|
||||
FromSuperName = Importer.Import(D->getSuperClass()->getDeclName());
|
||||
if (ToIface->getSuperClass())
|
||||
|
|
Loading…
Reference in New Issue