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/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp
index 8126693..a2480ba 100644
--- a/tools/libclang/IndexingContext.cpp
+++ b/tools/libclang/IndexingContext.cpp
@@ -300,9 +300,8 @@
}
bool IndexingContext::handleObjCClass(const ObjCClassDecl *D) {
- const ObjCClassDecl::ObjCClassRef *Ref = D->getForwardDecl();
- ObjCInterfaceDecl *IFaceD = Ref->getInterface();
- SourceLocation Loc = Ref->getLocation();
+ ObjCInterfaceDecl *IFaceD = D->getForwardInterfaceDecl();
+ SourceLocation Loc = D->getNameLoc();
bool isRedeclaration = IFaceD->getLocation() != Loc;
// For @class forward declarations, suppress them the same way as references.