Eliminate the vistigial ObjCClassDecl::ObjCClassRef, and inline its
members into ObjCClassDecl, saving ourselves one pointer per forward
declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146564 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp
index c716031..423f23d 100644
--- a/lib/AST/ASTImporter.cpp
+++ b/lib/AST/ASTImporter.cpp
@@ -3605,13 +3605,13 @@
// Import the location of this declaration.
SourceLocation Loc = Importer.Import(D->getLocation());
- ObjCClassDecl::ObjCClassRef *From = D->getForwardDecl();
ObjCInterfaceDecl *ToIface
- = cast_or_null<ObjCInterfaceDecl>(Importer.Import(From->getInterface()));
+ = cast_or_null<ObjCInterfaceDecl>(
+ Importer.Import(D->getForwardInterfaceDecl()));
ObjCClassDecl *ToClass = ObjCClassDecl::Create(Importer.getToContext(), DC,
- Loc,
- ToIface,
- Importer.Import(From->getLocation()));
+ Loc,
+ ToIface,
+ Importer.Import(D->getNameLoc()));
ToClass->setLexicalDeclContext(LexicalDC);
LexicalDC->addDeclInternal(ToClass);