Patch to rewrite ivar tables metadata for classes defined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43151 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index 5b54d8b..9c8ec7f 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -1225,8 +1225,6 @@
}
}
- ObjcImplementationDecl* IMPDecl =
- new ObjcImplementationDecl(AtClassImplLoc, ClassName, SDecl);
if (!IDecl) {
// Legacy case of @implementation with no corresponding @interface.
// Build, chain & install the interface decl into the identifier.
@@ -1238,6 +1236,9 @@
TUScope->AddDecl(IDecl);
}
+ ObjcImplementationDecl* IMPDecl =
+ new ObjcImplementationDecl(AtClassImplLoc, ClassName, IDecl, SDecl);
+
// Check that there is no duplicate implementation of this class.
if (!ObjcImplementations.insert(ClassName))
Diag(ClassLoc, diag::err_dup_implementation_class, ClassName->getName());