Make ObjCInterfaceDecl's const in some more places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69775 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index e0f4492..d3ac8c9 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -963,7 +963,7 @@
                                       const ObjCIvarDecl *Ivar,
                                       unsigned CVRQualifiers);
   virtual llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
-                                      ObjCInterfaceDecl *Interface,
+                                      const ObjCInterfaceDecl *Interface,
                                       const ObjCIvarDecl *Ivar);
 };
   
@@ -1152,7 +1152,7 @@
                                       const ObjCIvarDecl *Ivar,
                                       unsigned CVRQualifiers);
   virtual llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
-                                      ObjCInterfaceDecl *Interface,
+                                      const ObjCInterfaceDecl *Interface,
                                       const ObjCIvarDecl *Ivar);
 };
   
@@ -2643,7 +2643,7 @@
 }
 
 llvm::Value *CGObjCMac::EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
-                                       ObjCInterfaceDecl *Interface,
+                                       const ObjCInterfaceDecl *Interface,
                                        const ObjCIvarDecl *Ivar) {
   const llvm::StructLayout *Layout = GetInterfaceDeclStructLayout(Interface);
   const FieldDecl *Field = 
@@ -2827,8 +2827,7 @@
 const llvm::StructLayout *CGObjCCommonMac::GetInterfaceDeclStructLayout(
                                         const ObjCInterfaceDecl *OID) const {
   assert(!OID->isForwardDecl() && "Invalid interface decl!");
-  QualType T = 
-    CGM.getContext().getObjCInterfaceType(const_cast<ObjCInterfaceDecl*>(OID));
+  QualType T = CGM.getContext().getObjCInterfaceType(OID);
   const llvm::StructType *InterfaceTy = 
     cast<llvm::StructType>(CGM.getTypes().ConvertType(T));
   return CGM.getTargetData().getStructLayout(InterfaceTy);
@@ -4955,7 +4954,7 @@
 
 llvm::Value *CGObjCNonFragileABIMac::EmitIvarOffset(
                                        CodeGen::CodeGenFunction &CGF,
-                                       ObjCInterfaceDecl *Interface,
+                                       const ObjCInterfaceDecl *Interface,
                                        const ObjCIvarDecl *Ivar) {
   return CGF.Builder.CreateLoad(ObjCIvarOffsetVariable(Interface, Ivar), 
                                 false, "ivar");