Lines Matching refs:CharUnits
82 CharUnits BaselinePad = calculateBaselinePad(RD, ASTContext, RL); in visitRecord()
85 CharUnits OptimalPad = calculateOptimalPad(RD, ASTContext, RL); in visitRecord()
87 CharUnits DiffPad = PadMultiplier * (BaselinePad - OptimalPad); in visitRecord()
166 static CharUnits calculateBaselinePad(const RecordDecl *RD, in calculateBaselinePad()
169 CharUnits PaddingSum; in calculateBaselinePad()
170 CharUnits Offset = ASTContext.toCharUnitsFromBits(RL.getFieldOffset(0)); in calculateBaselinePad()
176 CharUnits FieldSize = ASTContext.getTypeSizeInChars(FD->getType()); in calculateBaselinePad()
178 CharUnits FieldOffset = ASTContext.toCharUnitsFromBits(FieldOffsetBits); in calculateBaselinePad()
202 static CharUnits calculateOptimalPad(const RecordDecl *RD, in calculateOptimalPad()
206 CharUnits Align; in calculateOptimalPad()
207 CharUnits Size; in calculateOptimalPad()
234 CharUnits NewOffset = ASTContext.toCharUnitsFromBits(RL.getFieldOffset(0)); in calculateOptimalPad()
235 CharUnits NewPad; in calculateOptimalPad()
244 CharUnits CurAlignment = CharUnits::fromQuantity(CurAlignmentBits); in calculateOptimalPad()
245 CharUnitPair InsertPoint = {CurAlignment, CharUnits::Zero()}; in calculateOptimalPad()
263 CharUnits NextOffset = NewOffset.alignTo(Fields[0].Align); in calculateOptimalPad()
269 CharUnits NewSize = NewOffset.alignTo(RL.getAlignment()); in calculateOptimalPad()
274 void reportRecord(const RecordDecl *RD, CharUnits BaselinePad, in reportRecord()
275 CharUnits TargetPad) const { in reportRecord()