const ConstantVector &OptInstanceMethods,
const ConstantVector &OptClassMethods) {
uint64_t Size =
- CGM.getTargetData().getABITypeSize(ObjCTypes.ProtocolExtensionTy);
+ CGM.getTargetData().getTypePaddedSize(ObjCTypes.ProtocolExtensionTy);
std::vector<llvm::Constant*> Values(4);
Values[0] = llvm::ConstantInt::get(ObjCTypes.IntTy, Size);
Values[1] =
return llvm::Constant::getNullValue(ObjCTypes.PropertyListPtrTy);
unsigned PropertySize =
- CGM.getTargetData().getABITypeSize(ObjCTypes.PropertyTy);
+ CGM.getTargetData().getTypePaddedSize(ObjCTypes.PropertyTy);
std::vector<llvm::Constant*> Values(3);
Values[0] = llvm::ConstantInt::get(ObjCTypes.IntTy, PropertySize);
Values[1] = llvm::ConstantInt::get(ObjCTypes.IntTy, Properties.size());
};
*/
void CGObjCMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
- unsigned Size = CGM.getTargetData().getABITypeSize(ObjCTypes.CategoryTy);
+ unsigned Size = CGM.getTargetData().getTypePaddedSize(ObjCTypes.CategoryTy);
// FIXME: This is poor design, the OCD should have a pointer to the
// category decl. Additionally, note that Category can be null for
const llvm::Type *InterfaceTy =
CGM.getTypes().ConvertType(CGM.getContext().getObjCInterfaceType(Interface));
unsigned Flags = eClassFlags_Factory;
- unsigned Size = CGM.getTargetData().getABITypeSize(InterfaceTy);
+ unsigned Size = CGM.getTargetData().getTypePaddedSize(InterfaceTy);
// FIXME: Set CXX-structors flag.
if (IsClassHidden(ID->getClassInterface()))
const llvm::Type *InterfaceTy,
const ConstantVector &Methods) {
unsigned Flags = eClassFlags_Meta;
- unsigned Size = CGM.getTargetData().getABITypeSize(ObjCTypes.ClassTy);
+ unsigned Size = CGM.getTargetData().getTypePaddedSize(ObjCTypes.ClassTy);
if (IsClassHidden(ID->getClassInterface()))
Flags |= eClassFlags_Hidden;
llvm::Constant *
CGObjCMac::EmitClassExtension(const ObjCImplementationDecl *ID) {
uint64_t Size =
- CGM.getTargetData().getABITypeSize(ObjCTypes.ClassExtensionTy);
+ CGM.getTargetData().getTypePaddedSize(ObjCTypes.ClassExtensionTy);
std::vector<llvm::Constant*> Values(3);
Values[0] = llvm::ConstantInt::get(ObjCTypes.IntTy, Size);
static const int ModuleVersion = 7;
void CGObjCMac::EmitModuleInfo() {
- uint64_t Size = CGM.getTargetData().getABITypeSize(ObjCTypes.ModuleTy);
+ uint64_t Size = CGM.getTargetData().getTypePaddedSize(ObjCTypes.ModuleTy);
std::vector<llvm::Constant*> Values(4);
Values[0] = llvm::ConstantInt::get(ObjCTypes.LongTy, ModuleVersion);
Field != FieldEnd; ++Field) {
uint64_t offset = RL.getFieldOffset(curField);
const llvm::Type *Ty = CGT.ConvertTypeRecursive(Field->getType());
- uint64_t size = CGT.getTargetData().getABITypeSizeInBits(Ty);
+ uint64_t size = CGT.getTargetData().getTypePaddedSizeInBits(Ty);
if (Field->isBitField()) {
Expr *BitWidth = Field->getBitWidth();
}
STy = llvm::StructType::get(LLVMFields, true);
- assert(CGT.getTargetData().getABITypeSizeInBits(STy) == RL.getSize());
+ assert(CGT.getTargetData().getTypePaddedSizeInBits(STy) == RL.getSize());
}
/// layoutUnionFields - Do the actual work and lay out all fields. Create
// structures should be aligning them appropriately anyway.
// FIXME: We can be a bit more intuitive in a lot of cases.
STy = llvm::ArrayType::get(llvm::Type::Int8Ty, RL.getSize() / 8);
- assert(CGT.getTargetData().getABITypeSizeInBits(STy) == RL.getSize());
+ assert(CGT.getTargetData().getTypePaddedSizeInBits(STy) == RL.getSize());
}