remove ASTContext::buildObjCInterfaceType, which breaks canonical 
types.  It is no longer needed now that the code generator 
re-lays-out interfaces if they are defines after being laid out
from a forward decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68194 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 75cf4e7..351f8e2 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -1459,7 +1459,7 @@
                      Interface->protocol_begin(),
                      Interface->protocol_end());
   const llvm::Type *InterfaceTy = 
-   CGM.getTypes().ConvertType(CGM.getContext().buildObjCInterfaceType(Interface));
+   CGM.getTypes().ConvertType(CGM.getContext().getObjCInterfaceType(Interface));
   unsigned Flags = eClassFlags_Factory;
   unsigned Size = CGM.getTargetData().getTypePaddedSize(InterfaceTy);
 
@@ -4246,9 +4246,6 @@
     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())) {