clang 24.0.0git
clang::CharUnits Class Reference

This is an opaque type for sizes expressed in character units. More...

#include "clang/AST/CharUnits.h"

Public Types

typedef int64_t QuantityType

Public Member Functions

 CharUnits ()=default
 A default constructor.
CharUnits & operator+= (CharUnits Other)
CharUnits & operator++ ()
CharUnits operator++ (int)
CharUnits & operator-= (CharUnits Other)
CharUnits & operator-- ()
CharUnits operator-- (int)
bool operator== (CharUnits Other) const
bool operator!= (CharUnits Other) const
bool operator< (CharUnits Other) const
bool operator<= (CharUnits Other) const
bool operator> (CharUnits Other) const
bool operator>= (CharUnits Other) const
bool isZero () const
 Test whether the quantity equals zero.
bool isOne () const
 Test whether the quantity equals one.
bool isPositive () const
 Test whether the quantity is greater than zero.
bool isNegative () const
 Test whether the quantity is less than zero.
bool isPowerOfTwo () const
 Test whether the quantity is a power of two.
bool isMultipleOf (CharUnits N) const
 Test whether this is a multiple of the other value.
CharUnits operator* (QuantityType N) const
CharUnits & operator*= (QuantityType N)
CharUnits operator/ (QuantityType N) const
CharUnits & operator/= (QuantityType N)
QuantityType operator/ (CharUnits Other) const
CharUnits operator% (QuantityType N) const
CharUnits operator% (CharUnits Other) const
CharUnits operator+ (CharUnits Other) const
CharUnits operator- (CharUnits Other) const
CharUnits operator- () const
QuantityType getQuantity () const
 Get the raw integer representation of this quantity.
llvm::Align getAsAlign () const
 Returns Quantity as a valid llvm::Align, Beware llvm::Align assumes power of two 8-bit bytes.
llvm::MaybeAlign getAsMaybeAlign () const
 Returns Quantity as a valid llvm::Align or std::nullopt, Beware llvm::MaybeAlign assumes power of two 8-bit bytes.
CharUnits alignTo (CharUnits Align) const
 Returns the next integer (mod 2**64) that is greater than or equal to this quantity and is a multiple of Align.
CharUnits alignmentAtOffset (CharUnits offset) const
 Given that this is a non-zero alignment value, what is the alignment at the given offset?
CharUnits alignmentOfArrayElement (CharUnits elementSize) const
 Given that this is the alignment of the first element of an array, return the minimum alignment of any element in the array.

Static Public Member Functions

static CharUnits Zero ()
 Construct a CharUnits quantity of zero.
static CharUnits One ()
 Construct a CharUnits quantity of one.
static CharUnits fromQuantity (QuantityType Quantity)
 Construct a CharUnits quantity from a raw integer type.
static CharUnits fromQuantity (llvm::Align Quantity)
 Construct a CharUnits quantity from an llvm::Align quantity.

Detailed Description

This is an opaque type for sizes expressed in character units.

Instances of this type represent a quantity as a multiple of the size of the standard C type, char, on the target architecture. As an opaque type, CharUnits protects you from accidentally combining operations on quantities in bit units and character units.

In both C and C++, an object of type 'char', 'signed char', or 'unsigned char' occupies exactly one byte, so 'character unit' and 'byte' refer to the same quantity of storage. However, we use the term 'character unit' rather than 'byte' to avoid an implication that a character unit is exactly 8 bits.

For portability, never assume that a target character is 8 bits wide. Use CharUnit values wherever you calculate sizes, offsets, or alignments in character units.

Definition at line 38 of file CharUnits.h.

Member Typedef Documentation

◆ QuantityType

Definition at line 40 of file CharUnits.h.

Constructor & Destructor Documentation

◆ CharUnits()

clang::CharUnits::CharUnits ( )
default

Member Function Documentation

◆ alignmentAtOffset()

◆ alignmentOfArrayElement()

◆ alignTo()

◆ fromQuantity() [1/2]

CharUnits clang::CharUnits::fromQuantity ( llvm::Align Quantity)
inlinestatic

Construct a CharUnits quantity from an llvm::Align quantity.

Definition at line 64 of file CharUnits.h.

References CharUnits().

◆ fromQuantity() [2/2]

CharUnits clang::CharUnits::fromQuantity ( QuantityType Quantity)
inlinestatic

Construct a CharUnits quantity from a raw integer type.

Definition at line 58 of file CharUnits.h.

References CharUnits().

Referenced by clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl(), addOrSubLValueAsInteger(), clang::CodeGen::ConstantAggregateBuilderBase::addPlaceholderWithSize(), CheckAggExprForMemSetUse(), CheckAtomicAlignment(), checkAtomicAlignment(), CheckSufficientAllocSize(), ClearPadding(), clang::CodeGenUtils::computeOffsetHint(), convertUnsignedAPIntToCharUnits(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateConstGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CodeGenFunction::CreateDefaultAlignTempAlloca(), clang::CIRGen::CIRGenFunction::createDefaultAlignTempAlloca(), clang::CodeGen::CGBuilderTy::CreateGEP(), clang::CIRGen::CIRGenBuilderTy::createGetMember(), createPlaceholderSlot(), clang::CodeGen::CGBuilderTy::CreatePreserveStructAccessIndex(), createReferenceTemporary(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CreateTempAllocaForCoercion(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), emitAddressAtOffset(), clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrong(), clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), clang::CodeGen::CGHLSLRuntime::emitBufferArraySubscriptExpr(), clang::CodeGen::CGHLSLRuntime::emitBufferMemberExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CGCUDARuntime::EmitCUDADeviceKernelCallExpr(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), emitGetParamBuf(), emitNeonMultiVecLoadCall(), clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(), emitOutlinedFunctionPrologueAggregate(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinCpu(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), clang::CodeGen::CGHLSLRuntime::emitResourceMemberExpr(), clang::CodeGen::CodeGenFunction::EmitRISCVBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CIRGen::CIRGenFunction::emitStringLiteralLValue(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitX86_64VAArgFromMemory(), emitX86Aes(), emitX86Aeswide(), clang::CIRGen::CIRGenFunction::emitX86BuiltinExpr(), clang::CIRGen::CIRGenFunction::emitX86CpuIs(), clang::CIRGen::CIRGenFunction::emitX86CpuSupports(), enterNewDeleteCleanup(), clang::CIRGen::CIRGenVTables::generateConstructionVTable(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CIRGen::CIRGenFunction::getAddrOfBitFieldStorage(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::CodeGen::CodeGenModule::GetAddrOfMSGuidDecl(), clang::CIRGen::CIRGenVTables::getAddrOfVTT(), clang::CIRGen::LValue::getAlignment(), clang::CodeGen::CGFunctionInfo::getArgStructAlignment(), clang::ento::ElementRegion::getAsArrayOffset(), clang::ASTContext::getASTRecordLayout(), getBaseAlignmentAndOffsetFromLValue(), clang::CodeGen::CodeGenFunction::getBlockByrefInfo(), clang::CodeGen::swiftcall::SwiftAggLowering::getCoerceAndExpandTypes(), getConstantArrayInfoInChars(), clang::CodeGen::CodeGenFunction::getEHSelectorSlot(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), clang::CodeGen::CodeGenTypeCache::getIntSize(), getLowBit(), getMaxAtomicAccessSize(), clang::CodeGen::swiftcall::getNaturalAlignment(), clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::CodeGen::CGBlockInfo::Capture::getOffset(), getOffsetAtStartOfUnit(), getOffsetOfFullPath(), clang::CodeGen::CodeGenModule::getOMPAllocateAlignment(), clang::CIRGen::CIRGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenTypeCache::getPointerSize(), clang::CIRGen::CIRGenTypeCache::getSizeAlign(), clang::CodeGen::CodeGenTypeCache::getSizeAlign(), clang::CIRGen::CIRGenTypeCache::getSizeSize(), clang::CodeGen::CodeGenTypeCache::getSizeSize(), getTypeAllocSize(), getTypeStoreSize(), initializeForBlockHeader(), clang::interp::interp__builtin_assume_aligned(), clang::interp::interp__builtin_atomic_lock_free(), clang::interp::interp__builtin_c11_atomic_is_lock_free(), clang::interp::interp__builtin_is_aligned_up_down(), clang::interp::InterpretOffsetOf(), clang::CodeGenUtils::isVarDeclStrongDefinition(), clang::LayoutOverrideSource::LayoutOverrideSource(), clang::CodeGen::HLSLBufferLayoutBuilder::layOutStruct(), loadRISCVFeatureBits(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), packArgsIntoNVPTXFormatBuffer(), performTypeAdjustment(), cir::CIRABIRewriteContext::rewriteVAArg(), clang::CodeGen::DominatingLLVMValue::save(), clang::analyze_os_log::OSLogBufferLayout::size(), clang::interp::Integral< Bits, false >::toAPValue(), clang::interp::Pointer::toAPValue(), clang::ASTContext::toCharUnitsFromBits(), clang::CodeGen::CodeGenTypes::typeRequiresSplitIntoByteArray(), and clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr().

◆ getAsAlign()

llvm::Align clang::CharUnits::getAsAlign ( ) const
inline

Returns Quantity as a valid llvm::Align, Beware llvm::Align assumes power of two 8-bit bytes.

Definition at line 157 of file CharUnits.h.

Referenced by buildGlobalBlock(), clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), clang::CodeGen::CGBuilderTy::CreateAlignedStore(), CreateCoercedLoad(), clang::CodeGen::CodeGenFunction::CreateCoercedStore(), clang::CIRGen::CIRGenBuilderTy::createGetBitfield(), createLoadInstBefore(), createLoadInstBefore(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CGBuilderTy::CreateMemCpyInline(), clang::CodeGen::CGBuilderTy::CreateMemMove(), clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CodeGen::CGBuilderTy::CreateMemSetInline(), createReferenceTemporary(), clang::CIRGen::CIRGenBuilderTy::createSetBitfield(), createStoreInstBefore(), clang::CodeGen::CodeGenFunction::CreateTempAllocaWithoutCast(), clang::CodeGen::CodeGenModule::createUnnamedGlobalFrom(), emitAtomicCmpXchg(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitNullBaseClassInitialization(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CIRGen::CIRGenFunction::emitStaticVarDecl(), GenerateStringLiteral(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary(), clang::CIRGen::CIRGenModule::getAddrOfTemplateParamObject(), clang::CodeGen::CodeGenModule::GetAddrOfUnnamedGlobalConstantDecl(), clang::CIRGen::CIRGenModule::getAddrOfUnnamedGlobalConstantDecl(), getInitThreadEpochPtr(), clang::CodeGen::DominatingLLVMValue::save(), clang::CIRGen::CIRGenFunction::setBeforeOutermostConditional(), and clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional().

◆ getAsMaybeAlign()

llvm::MaybeAlign clang::CharUnits::getAsMaybeAlign ( ) const
inline

Returns Quantity as a valid llvm::Align or std::nullopt, Beware llvm::MaybeAlign assumes power of two 8-bit bytes.

Definition at line 162 of file CharUnits.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitTypeCheck().

◆ getQuantity()

QuantityType clang::CharUnits::getQuantity ( ) const
inline

Get the raw integer representation of this quantity.

Definition at line 153 of file CharUnits.h.

Referenced by clang::Sema::ActOnFields(), AddPointerLayoutOffset(), AddRelativeLayoutOffset(), clang::ODRHash::AddStructuralValue(), ApplyNonVirtualAndVirtualOffset(), clang::interp::IntPointer::atOffset(), clang::ASTContext::AtomicUsesUnsupportedLibcall(), clang::interp::IntPointer::baseCast(), buildBlockDescriptor(), buildGlobalBlock(), buildMemcpyForAssignmentOp(), calculateOffset(), clang::ento::StoreManager::castRegion(), charUnitsToString(), clang::SemaPPC::checkAIXMemberAlignment(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::checkArrayElementAlignment(), CheckAtomicAlignment(), checkAtomicAlignment(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCXXThrowOperand(), CheckExpectedBitWidth(), clang::Sema::CheckThreadLocalForLargeAlignment(), computeBlockInfo(), computeFullDescSize(), clang::interp::OpaquePointer::computeLayoutOffset(), clang::interp::Pointer::computeLayoutOffset(), clang::interp::Pointer::computeOffsetForComparison(), computeOpaquePtrOffset(), computeOpaqueSize(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), convertSizedByBoundToElementCount(), clang::CIRGen::CIRGenBuilderTy::createCopy(), clang::CIRGen::CIRGenBuilderTy::createMemCpy(), clang::interp::DoBitCastPtr(), clang::CodeGen::ABIArgInfo::dump(), DumpRecordLayout(), clang::ento::RegionRawOffset::dumpToStream(), emitAddrOfZeroSizeField(), emitAlignedClause(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), emitAtomicOp(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CodeGen::CodeGenFunction::emitByrefStructureInit(), clang::CIRGen::CIRGenFunction::emitCXXDeleteExpr(), EmitCXXNewAllocSize(), emitCXXNewAllocSize(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CIRGen::CIRGenFunction::emitDeleteCall(), emitDynamicCastInfo(), clang::CIRGen::CIRGenFunction::emitInvariantStart(), EmitISOVolatileLoad(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), emitNonZeroVLAInit(), clang::CodeGen::emitRoundPointerUpToAlignment(), encodeTypeForFunctionPointerAuth(), clang::interp::evaluateBuiltinObjectSize(), EvaluateComparisonBinaryOperator(), clang::CodeGen::CodeGenFunction::generateBuiltinOSLogHelperFunction(), clang::CIRGen::CIRGenVTables::generateConstructionVTable(), clang::CIRGen::CIRGenFunction::getAddressOfDerivedClass(), clang::CIRGen::CIRGenFunction::getAddressOfDirectBaseInCompleteClass(), GetAlignedMapping(), cir::CIRBaseBuilderTy::getAlignment(), cir::CIRBaseBuilderTy::getAlignmentAttr(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::CodeGenFunction::getBlockByrefInfo(), getBlockDescriptorName(), getConstantArrayInfoInChars(), getCopyDestroyHelperFuncName(), getElementSize(), clang::CIRGen::CIRGenModule::getGlobalForStringLiteral(), llvm::DenseMapInfo< clang::CharUnits >::getHashValue(), getIndex(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcAllocShared(), getLowBit(), clang::CodeGen::swiftcall::getNaturalAlignment(), clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), getOffsetAtStartOfUnit(), clang::CodeGen::CodeGenModule::getOMPAllocateAlignment(), clang::CodeGen::CGBuilderTy::getSize(), clang::CodeGen::CodeGenModule::getSize(), clang::analyze_os_log::OSLogBufferItem::getSizeByte(), cir::CIRBaseBuilderTy::getSizeFromCharUnits(), HandleOperatorNewCall(), initializeForBlockHeader(), clang::interp::interp__builtin_assume_aligned(), clang::interp::interp__builtin_is_aligned_up_down(), clang::interp::interp__builtin_memcmp(), clang::interp::interp__builtin_memcpy(), clang::interp::interp__builtin_operator_new(), clang::interp::interp__builtin_os_log_format_buffer_size(), clang::interp::interp__builtin_strlen(), clang::interp::InterpretOffsetOf(), clang::CodeGen::SwiftABIInfo::isLegalVectorType(), clang::CodeGen::CGBlockInfo::Capture::makeIndex(), mergeAlignedAttrs(), clang::interp::OffsetHelper(), clang::APValue::printPretty(), cir::CIRCXXABI::readArrayCookie(), clang::CIRGen::LValue::setAddress(), clang::CIRGen::LValue::setAlignment(), clang::CodeGen::CGFunctionInfo::setArgStruct(), clang::CodeGen::ABIArgInfo::setIndirectAlign(), setUsedBits(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::interp::Pointer::toAPValue(), clang::ASTContext::toBits(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), tryEvaluateBuiltinObjectSize(), tryToInvalidateFReadBufferByElements(), clang::Value::Value(), clang::interp::Compiler< Emitter >::VisitPointerArithBinOp(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr().

◆ isMultipleOf()

bool clang::CharUnits::isMultipleOf ( CharUnits N) const
inline

Test whether this is a multiple of the other value.

Among other things, this promises that self.alignTo(N) will just return self.

Definition at line 120 of file CharUnits.h.

References Zero().

Referenced by clang::ento::StoreManager::castRegion(), and clang::APValue::printPretty().

◆ isNegative()

bool clang::CharUnits::isNegative ( ) const
inline

Test whether the quantity is less than zero.

Definition at line 110 of file CharUnits.h.

Referenced by EmitNullBaseClassInitialization().

◆ isOne()

◆ isPositive()

bool clang::CharUnits::isPositive ( ) const
inline

◆ isPowerOfTwo()

bool clang::CharUnits::isPowerOfTwo ( ) const
inline

Test whether the quantity is a power of two.

Zero is not a power of two.

Definition at line 114 of file CharUnits.h.

◆ isZero()

bool clang::CharUnits::isZero ( ) const
inline

◆ One()

CharUnits clang::CharUnits::One ( )
inlinestatic

Construct a CharUnits quantity of one.

Definition at line 55 of file CharUnits.h.

References CharUnits().

Referenced by AlignOfType(), clang::CodeGen::AssignToArrayRange(), CheckSufficientAllocSize(), convertSizedByBoundToElementCount(), clang::CIRGen::CIRGenBuilderTy::createAlignedLoad(), clang::CIRGen::CIRGenFunction::createCleanupActiveFlag(), clang::CodeGen::CodeGenFunction::createCleanupActiveFlag(), clang::CodeGen::CGBuilderTy::CreateFlagLoad(), clang::CodeGen::CGBuilderTy::CreateFlagStore(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CIRGen::CIRGenFunction::emitAsmStmt(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), EmitBitTestIntrinsic(), emitEncodeKey(), clang::CIRGen::CIRGenFunction::emitLoopConditionVariable(), emitTlsGuardCheck(), clang::CodeGen::CodeGenFunction::EmitUnsupportedLValue(), clang::CIRGen::CIRGenFunction::emitX86BuiltinExpr(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), GetAlignOfType(), clang::CIRGen::CIRGenModule::getClassPointerAlignment(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), clang::CIRGen::CIRGenModule::getMinimumClassObjectSize(), clang::CodeGen::CodeGenModule::getMinimumClassObjectSize(), clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), HandleSizeof(), clang::interp::interp__builtin_atomic_lock_free(), performTypeAdjustment(), clang::CIRGen::CIRGenFunction::popCleanupBlock(), clang::APValue::printPretty(), SetupCleanupBlockActivation(), setupCleanupBlockDeactivation(), clang::interp::Compiler< Emitter >::VisitPointerArithBinOp(), and clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr().

◆ operator!=()

bool clang::CharUnits::operator!= ( CharUnits Other) const
inline

Definition at line 90 of file CharUnits.h.

References clang::Other.

◆ operator%() [1/2]

CharUnits clang::CharUnits::operator% ( CharUnits Other) const
inline

Definition at line 139 of file CharUnits.h.

References CharUnits(), and clang::Other.

◆ operator%() [2/2]

CharUnits clang::CharUnits::operator% ( QuantityType N) const
inline

Definition at line 138 of file CharUnits.h.

References CharUnits().

◆ operator*()

CharUnits clang::CharUnits::operator* ( QuantityType N) const
inline

Definition at line 125 of file CharUnits.h.

References CharUnits().

◆ operator*=()

CharUnits & clang::CharUnits::operator*= ( QuantityType N)
inline

Definition at line 126 of file CharUnits.h.

◆ operator+()

CharUnits clang::CharUnits::operator+ ( CharUnits Other) const
inline

Definition at line 142 of file CharUnits.h.

References CharUnits(), and clang::Other.

◆ operator++() [1/2]

CharUnits & clang::CharUnits::operator++ ( )
inline

Definition at line 73 of file CharUnits.h.

◆ operator++() [2/2]

CharUnits clang::CharUnits::operator++ ( int )
inline

Definition at line 77 of file CharUnits.h.

References CharUnits().

◆ operator+=()

CharUnits & clang::CharUnits::operator+= ( CharUnits Other)
inline

Definition at line 69 of file CharUnits.h.

References clang::Other.

◆ operator-() [1/2]

CharUnits clang::CharUnits::operator- ( ) const
inline

Definition at line 148 of file CharUnits.h.

References CharUnits().

◆ operator-() [2/2]

CharUnits clang::CharUnits::operator- ( CharUnits Other) const
inline

Definition at line 145 of file CharUnits.h.

References CharUnits(), and clang::Other.

◆ operator--() [1/2]

CharUnits & clang::CharUnits::operator-- ( )
inline

Definition at line 82 of file CharUnits.h.

◆ operator--() [2/2]

CharUnits clang::CharUnits::operator-- ( int )
inline

Definition at line 86 of file CharUnits.h.

References CharUnits().

◆ operator-=()

CharUnits & clang::CharUnits::operator-= ( CharUnits Other)
inline

Definition at line 78 of file CharUnits.h.

References clang::Other.

◆ operator/() [1/2]

QuantityType clang::CharUnits::operator/ ( CharUnits Other) const
inline

Definition at line 135 of file CharUnits.h.

References clang::Other.

◆ operator/() [2/2]

CharUnits clang::CharUnits::operator/ ( QuantityType N) const
inline

Definition at line 130 of file CharUnits.h.

References CharUnits().

◆ operator/=()

CharUnits & clang::CharUnits::operator/= ( QuantityType N)
inline

Definition at line 131 of file CharUnits.h.

◆ operator<()

bool clang::CharUnits::operator< ( CharUnits Other) const
inline

Definition at line 93 of file CharUnits.h.

References clang::Other.

◆ operator<=()

bool clang::CharUnits::operator<= ( CharUnits Other) const
inline

Definition at line 94 of file CharUnits.h.

References clang::Other.

◆ operator==()

bool clang::CharUnits::operator== ( CharUnits Other) const
inline

Definition at line 89 of file CharUnits.h.

References clang::Other.

◆ operator>()

bool clang::CharUnits::operator> ( CharUnits Other) const
inline

Definition at line 95 of file CharUnits.h.

References clang::Other.

◆ operator>=()

bool clang::CharUnits::operator>= ( CharUnits Other) const
inline

Definition at line 96 of file CharUnits.h.

References clang::Other.

◆ Zero()

CharUnits clang::CharUnits::Zero ( )
inlinestatic

Construct a CharUnits quantity of zero.

Definition at line 52 of file CharUnits.h.

References CharUnits().

Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), BuildAppleKextVirtualCall(), CalculateCookiePadding(), calculateCookiePadding(), classifyType(), computeBlockInfo(), computeFullPathsForVFTables(), clang::CIRGen::CIRGenModule::computeNonVirtualBaseClassOffset(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), CreatePFPCoercedLoad(), CreatePFPCoercedStore(), clang::CodeGen::CodeGenFunction::defaultInitNonTrivialCStructVar(), DiagnoseReinterpretUpDownCast(), clang::ento::RegionRawOffset::ElementRegion, clang::CodeGen::CGCUDARuntime::EmitCUDADeviceKernelCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), emitExactDynamicCast(), emitGetParamBuf(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), EmitNullBaseClassInitialization(), emitNullBaseClassInitialization(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::SourceLocExpr::EvaluateInContext(), clang::ASTContext::findPFPFields(), getAlignmentAndOffsetFromBinAddOrSub(), clang::CodeGen::CGCXXABI::GetArrayCookieSize(), clang::CIRGen::CIRGenCXXABI::getArrayCookieSize(), clang::CodeGen::CGCXXABI::getArrayCookieSizeImpl(), clang::ASTContext::getASTRecordLayout(), getBaseAlignmentAndOffsetFromLValue(), getBaseAlignmentAndOffsetFromPtr(), clang::CodeGen::swiftcall::SwiftAggLowering::getCoerceAndExpandTypes(), getDerivedToBaseAlignmentAndOffset(), clang::VarDecl::getFlexibleArrayInitChars(), clang::ASTContext::getMemberPointerPathAdjustment(), GetNumNonZeroBytesInInit(), clang::ASTContext::getObjCEncodingForFunctionDecl(), clang::ASTContext::getObjCEncodingTypeSize(), clang::ASTContext::getOffsetOfBaseWithVBPtr(), getOffsetOfFullPath(), getOrCreateCopyThunk(), getTypeExpansion(), clang::ItaniumVTableContext::getVirtualBaseOffsetOffset(), clang::CodeGen::CGCXXABI::getVirtualFunctionPrologueThisAdjustment(), clang::CIRGen::CIRGenFunction::getVTablePointers(), clang::CIRGen::CIRGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::InitializeVTablePointer(), clang::CIRGen::CIRGenFunction::initializeVTablePointer(), isMultipleOf(), clang::CodeGen::HLSLBufferLayoutBuilder::layOutStruct(), clang::CodeGen::CodeGenFunction::makeNaturalAddressForPointer(), clang::APValue::printPretty(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), selectBestPath(), clang::interp::Integral< Bits, false >::toAPValue(), clang::interp::Pointer::toAPValue(), and clang::VTTBuilder::VTTBuilder().


The documentation for this class was generated from the following file: