|
clang 24.0.0git
|
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. | |
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.
| typedef int64_t clang::CharUnits::QuantityType |
Definition at line 40 of file CharUnits.h.
|
default |
A default constructor.
Referenced by alignmentAtOffset(), alignTo(), fromQuantity(), fromQuantity(), One(), operator%(), operator%(), operator*(), operator+(), operator++(), operator-(), operator-(), operator--(), operator/(), and Zero().
Given that this is a non-zero alignment value, what is the alignment at the given offset?
Definition at line 177 of file CharUnits.h.
References CharUnits().
Referenced by alignmentOfArrayElement(), ApplyNonVirtualAndVirtualOffset(), ClearPadding(), clang::CIRGen::CIRGenBuilderTy::createGetMember(), clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), emitAddrOfZeroSizeField(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitExtVectorElementLValue(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), EvaluateStdcLoad8(), clang::CIRGen::CIRGenFunction::getAddrOfBitFieldStorage(), getArrayElementAlign(), getArrayElementAlign(), getBlockCaptureStr(), clang::interp::interp__builtin_is_aligned_up_down(), and clang::interp::interp__builtin_load8().
Given that this is the alignment of the first element of an array, return the minimum alignment of any element in the array.
Definition at line 184 of file CharUnits.h.
References alignmentAtOffset().
Referenced by EmitArrayDelete(), EmitConditionalArrayDtorCall(), clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXAggrConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXDeleteExpr(), clang::CIRGen::CIRGenFunction::emitDestroy(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CIRGen::CIRGenFunction::emitNewArrayInitializer(), emitNonZeroVLAInit(), clang::CodeGen::CodeGenFunction::EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedMapper(), getArrayElementAlign(), and getArrayElementAlign().
Returns the next integer (mod 2**64) that is greater than or equal to this quantity and is a multiple of Align.
Align must be non-zero.
Definition at line 171 of file CharUnits.h.
References CharUnits().
Referenced by clang::CodeGen::ConstantAggregateBuilderBase::addPlaceholderWithSize(), computeBlockInfo(), clang::CodeGen::CGHLSLRuntime::emitBufferArraySubscriptExpr(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::emitVoidPtrDirectVAArg(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::getBlockByrefInfo(), clang::interp::interp__builtin_assume_aligned(), and clang::CodeGen::HLSLBufferLayoutBuilder::layOutStruct().
|
inlinestatic |
Construct a CharUnits quantity from an llvm::Align quantity.
Definition at line 64 of file CharUnits.h.
References CharUnits().
|
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(), emitAMDGPUGridSize(), emitAMDGPUWorkGroupSizeV4(), emitAMDGPUWorkGroupSizeV5(), 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::interp__builtin_load8(), clang::interp::InterpretOffsetOf(), clang::CodeGenUtils::isVarDeclStrongDefinition(), clang::LayoutOverrideSource::LayoutOverrideSource(), clang::CodeGen::HLSLBufferLayoutBuilder::layOutStruct(), loadRISCVFeatureBits(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), 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().
|
inline |
Returns Quantity as a valid llvm::Align, Beware llvm::Align assumes power of two 8-bit bytes.
Definition at line 159 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().
|
inline |
Returns Quantity as a valid llvm::Align or std::nullopt, Beware llvm::MaybeAlign assumes power of two 8-bit bytes.
Definition at line 164 of file CharUnits.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitTypeCheck().
|
inline |
Get the raw integer representation of this quantity.
Definition at line 155 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::CIRGen::CIRGenBuilderTy::createMemMove(), 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(), EvaluateStdcLoad8(), 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_load8(), 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 >::visitAPValue(), clang::interp::Compiler< Emitter >::VisitPointerArithBinOp(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr().
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 122 of file CharUnits.h.
References Zero().
Referenced by clang::ento::StoreManager::castRegion(), and clang::APValue::printPretty().
|
inline |
Test whether the quantity is less than zero.
Definition at line 110 of file CharUnits.h.
Referenced by EmitNullBaseClassInitialization().
|
inline |
Test whether the quantity equals one.
Definition at line 104 of file CharUnits.h.
Referenced by clang::Sema::CheckCastAlign(), EmitCXXNewAllocSize(), emitCXXNewAllocSize(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), isSafeTwoParamContainerConstruct(), clang::Sema::RefersToMemberWithReducedAlignment(), and clang::CodeGen::EHCleanupScope::setActiveFlag().
|
inline |
Test whether the quantity is greater than zero.
Definition at line 107 of file CharUnits.h.
Referenced by clang::ASTContext::getObjCEncodingForBlock(), clang::ASTContext::getObjCEncodingForFunctionDecl(), clang::ASTContext::getObjCEncodingForMethodDecl(), and clang::ASTContext::getObjCEncodingTypeSize().
|
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.
|
inline |
Test whether the quantity equals zero.
Definition at line 101 of file CharUnits.h.
Referenced by clang::CodeGen::Address::Address(), ApplyNonVirtualAndVirtualOffset(), clang::ento::StoreManager::castRegion(), castValueToType(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), emitAddrOfZeroSizeField(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrong(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), EmitNullBaseClassInitialization(), EmitNullConstant(), emitNullConstant(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CIRGen::CIRGenFunction::emitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitVTableAssumptionLoad(), EvaluateBuiltinConstantPForLValue(), EvaluateComparisonBinaryOperator(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CIRGen::CIRGenFunction::getAddressOfBaseClass(), GetAddrOfVTTVTable(), getAddrOfVTTVTable(), clang::ASTContext::getObjCEncodingForBlock(), clang::ASTContext::getObjCEncodingForFunctionDecl(), clang::ASTContext::getObjCEncodingForMethodDecl(), clang::CodeGen::CodeGenFunction::InitializeVTablePointer(), clang::CIRGen::CIRGenFunction::initializeVTablePointer(), clang::interp::interp__builtin_operator_new(), isProvablyZeroSize(), clang::CIRGen::CIRGenFunction::makeNaturalAddressForPointer(), clang::APValue::printPretty(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().
|
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::CIRGen::CIRGenModule::createGlobalString(), 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(), clang::GetAlignOfDynamicAlloc(), 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().
Definition at line 90 of file CharUnits.h.
References clang::Other.
Definition at line 141 of file CharUnits.h.
References CharUnits(), and clang::Other.
|
inline |
Definition at line 140 of file CharUnits.h.
References CharUnits().
|
inline |
Definition at line 127 of file CharUnits.h.
References CharUnits().
|
inline |
Definition at line 128 of file CharUnits.h.
Definition at line 144 of file CharUnits.h.
References CharUnits(), and clang::Other.
|
inline |
Definition at line 73 of file CharUnits.h.
Definition at line 77 of file CharUnits.h.
References CharUnits().
Definition at line 69 of file CharUnits.h.
References clang::Other.
|
inline |
Definition at line 150 of file CharUnits.h.
References CharUnits().
Definition at line 147 of file CharUnits.h.
References CharUnits(), and clang::Other.
|
inline |
Definition at line 82 of file CharUnits.h.
Definition at line 86 of file CharUnits.h.
References CharUnits().
Definition at line 78 of file CharUnits.h.
References clang::Other.
|
inline |
Definition at line 137 of file CharUnits.h.
References clang::Other.
|
inline |
Definition at line 132 of file CharUnits.h.
References CharUnits().
|
inline |
Definition at line 133 of file CharUnits.h.
Definition at line 93 of file CharUnits.h.
References clang::Other.
Definition at line 94 of file CharUnits.h.
References clang::Other.
Definition at line 89 of file CharUnits.h.
References clang::Other.
Definition at line 95 of file CharUnits.h.
References clang::Other.
Definition at line 96 of file CharUnits.h.
References clang::Other.
|
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().