getContext().getObjCGCAttrKind(E->getType()));
}
-llvm::Value *CodeGenFunction::EmitIvarOffset(ObjCInterfaceDecl *Interface,
+llvm::Value *CodeGenFunction::EmitIvarOffset(const ObjCInterfaceDecl *Interface,
const ObjCIvarDecl *Ivar) {
return CGM.getObjCRuntime().EmitIvarOffset(*this, Interface, Ivar);
}
const ObjCIvarDecl *Ivar,
unsigned CVRQualifiers);
virtual llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
- ObjCInterfaceDecl *Interface,
+ const ObjCInterfaceDecl *Interface,
const ObjCIvarDecl *Ivar);
};
} // end anonymous namespace
}
llvm::Value *CGObjCGNU::EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
- ObjCInterfaceDecl *Interface,
+ const ObjCInterfaceDecl *Interface,
const ObjCIvarDecl *Ivar) {
const llvm::Type *InterfaceLTy =
CGM.getTypes().ConvertType(
const ObjCIvarDecl *Ivar,
unsigned CVRQualifiers);
virtual llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
- ObjCInterfaceDecl *Interface,
+ const ObjCInterfaceDecl *Interface,
const ObjCIvarDecl *Ivar);
};
const ObjCIvarDecl *Ivar,
unsigned CVRQualifiers);
virtual llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
- ObjCInterfaceDecl *Interface,
+ const ObjCInterfaceDecl *Interface,
const ObjCIvarDecl *Ivar);
};
}
llvm::Value *CGObjCMac::EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
- ObjCInterfaceDecl *Interface,
+ const ObjCInterfaceDecl *Interface,
const ObjCIvarDecl *Ivar) {
const llvm::StructLayout *Layout = GetInterfaceDeclStructLayout(Interface);
const FieldDecl *Field =
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);
llvm::Value *CGObjCNonFragileABIMac::EmitIvarOffset(
CodeGen::CodeGenFunction &CGF,
- ObjCInterfaceDecl *Interface,
+ const ObjCInterfaceDecl *Interface,
const ObjCIvarDecl *Ivar) {
return CGF.Builder.CreateLoad(ObjCIvarOffsetVariable(Interface, Ivar),
false, "ivar");
const ObjCIvarDecl *Ivar,
unsigned CVRQualifiers) = 0;
virtual llvm::Value *EmitIvarOffset(CodeGen::CodeGenFunction &CGF,
- ObjCInterfaceDecl *Interface,
+ const ObjCInterfaceDecl *Interface,
const ObjCIvarDecl *Ivar) = 0;
};
LValue EmitConditionalOperator(const ConditionalOperator *E);
LValue EmitCastLValue(const CastExpr *E);
- llvm::Value *EmitIvarOffset(ObjCInterfaceDecl *Interface,
+ llvm::Value *EmitIvarOffset(const ObjCInterfaceDecl *Interface,
const ObjCIvarDecl *Ivar);
LValue EmitLValueForField(llvm::Value* Base, FieldDecl* Field,
bool isUnion, unsigned CVRQualifiers);