Lines Matching refs:CharUnits
42 CharUnits NextFieldOffsetInChars;
43 CharUnits LLVMStructAlignment;
58 NextFieldOffsetInChars(CharUnits::Zero()), in ConstStructBuilder()
59 LLVMStructAlignment(CharUnits::One()) { } in ConstStructBuilder()
64 void AppendBytes(CharUnits FieldOffsetInChars, llvm::Constant *InitCst);
69 void AppendPadding(CharUnits PadSize);
71 void AppendTailPadding(CharUnits RecordSize);
79 const CXXRecordDecl *VTableClass, CharUnits BaseOffset);
82 CharUnits getAlignment(const llvm::Constant *C) const { in getAlignment()
83 if (Packed) return CharUnits::One(); in getAlignment()
84 return CharUnits::fromQuantity( in getAlignment()
88 CharUnits getSizeInChars(const llvm::Constant *C) const { in getSizeInChars()
89 return CharUnits::fromQuantity( in getSizeInChars()
99 CharUnits FieldOffsetInChars = Context.toCharUnitsFromBits(FieldOffset); in AppendField()
105 AppendBytes(CharUnits FieldOffsetInChars, llvm::Constant *InitCst) { in AppendBytes()
110 CharUnits FieldAlignment = getAlignment(InitCst); in AppendBytes()
113 CharUnits AlignedNextFieldOffsetInChars = in AppendBytes()
150 assert(LLVMStructAlignment == CharUnits::One() && in AppendBytes()
164 CharUnits PadSize = Context.toCharUnitsFromBits( in AppendBitField()
246 NextFieldOffsetInChars -= CharUnits::fromQuantity(AT->getNumElements()); in AppendBitField()
250 AppendPadding(CharUnits::fromQuantity(AT->getNumElements()-1)); in AppendBitField()
251 AppendPadding(CharUnits::One()); in AppendBitField()
304 void ConstStructBuilder::AppendPadding(CharUnits PadSize) { in AppendPadding()
309 if (PadSize > CharUnits::One()) in AppendPadding()
314 assert(getAlignment(C) == CharUnits::One() && in AppendPadding()
320 void ConstStructBuilder::AppendTailPadding(CharUnits RecordSize) { in AppendTailPadding()
329 CharUnits ElementOffsetInChars = CharUnits::Zero(); in ConvertStructToPacked()
334 CharUnits ElementAlign = CharUnits::fromQuantity( in ConvertStructToPacked()
336 CharUnits AlignedElementOffsetInChars = in ConvertStructToPacked()
341 CharUnits NumChars = in ConvertStructToPacked()
345 if (NumChars > CharUnits::One()) in ConvertStructToPacked()
361 LLVMStructAlignment = CharUnits::One(); in ConvertStructToPacked()
421 BaseInfo(const CXXRecordDecl *Decl, CharUnits Offset, unsigned Index) in BaseInfo()
426 CharUnits Offset;
436 CharUnits Offset) { in Build()
457 CharUnits BaseOffset = Layout.getBaseClassOffset(BD); in Build()
506 CharUnits LayoutSizeInChars = Layout.getSize(); in Finalize()
517 CharUnits LLVMSizeInChars = in Finalize()
591 Builder.Build(Val, RD, false, CD, CharUnits::Zero()); in BuildStruct()
1000 return ConstantAddress(CGM.GetAddrOfFunction(FD), CharUnits::One()); in EmitLValue()
1004 CharUnits Align = CGM.getContext().getDeclAlign(VD); in EmitLValue()
1029 CharUnits Align = CGM.getContext().getTypeAlignInChars(E->getType()); in EmitLValue()
1066 return ConstantAddress(Ptr, CharUnits::One()); in EmitLValue()
1501 CharUnits chars = getContext().toCharUnitsFromBits((int64_t) fieldOffset); in getMemberPointerConstant()