diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-22 05:08:15 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-22 05:08:15 +0000 |
commit | 2a03192a02dbf4fdff438d1e658356bde871aba4 (patch) | |
tree | 737d38cc78c86e3d0b9cc9db6c057ac381bbd18c /lib/CodeGen/CGObjCMac.cpp | |
parent | 71dfdb9bc91b5d81b124e6091c903e4efd87149d (diff) |
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
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index e0f4492513..d3ac8c92e2 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -963,7 +963,7 @@ private: const ObjCIvarDecl *Ivar, unsigned CVRQualifiers); virtual llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF, - ObjCInterfaceDecl *Interface, + const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar); }; @@ -1152,7 +1152,7 @@ public: const ObjCIvarDecl *Ivar, unsigned CVRQualifiers); virtual llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF, - ObjCInterfaceDecl *Interface, + const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar); }; @@ -2643,7 +2643,7 @@ LValue CGObjCMac::EmitObjCValueForIvar(CodeGen::CodeGenFunction &CGF, } 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 @@ llvm::Constant *CGObjCCommonMac::GetClassName(IdentifierInfo *Ident) { 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 @@ LValue CGObjCNonFragileABIMac::EmitObjCValueForIvar( llvm::Value *CGObjCNonFragileABIMac::EmitIvarOffset( CodeGen::CodeGenFunction &CGF, - ObjCInterfaceDecl *Interface, + const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar) { return CGF.Builder.CreateLoad(ObjCIvarOffsetVariable(Interface, Ivar), false, "ivar"); |