/external/clang/include/clang/AST/ |
D | CharUnits.h | 38 class CharUnits { 45 explicit CharUnits(QuantityType C) : Quantity(C) {} in CharUnits() function 50 CharUnits() : Quantity(0) {} in CharUnits() function 53 static CharUnits Zero() { in Zero() 54 return CharUnits(0); in Zero() 58 static CharUnits One() { in One() 59 return CharUnits(1); in One() 63 static CharUnits fromQuantity(QuantityType Quantity) { in fromQuantity() 64 return CharUnits(Quantity); in fromQuantity() 68 CharUnits& operator+= (const CharUnits &Other) { [all …]
|
D | RecordLayout.h | 39 CharUnits VBaseOffset; 52 VBaseInfo(CharUnits VBaseOffset, bool hasVtorDisp) : in VBaseInfo() 61 CharUnits Size; 64 CharUnits DataSize; 67 CharUnits Alignment; 71 CharUnits RequiredAlignment; 83 CharUnits NonVirtualSize; 87 CharUnits NonVirtualAlignment; 92 CharUnits SizeOfLargestEmptySubobject; 95 CharUnits VBPtrOffset; [all …]
|
D | VTableBuilder.h | 56 static VTableComponent MakeVCallOffset(CharUnits Offset) { in MakeVCallOffset() 60 static VTableComponent MakeVBaseOffset(CharUnits Offset) { in MakeVBaseOffset() 64 static VTableComponent MakeOffsetToTop(CharUnits Offset) { in MakeOffsetToTop() 106 CharUnits getVCallOffset() const { in getVCallOffset() 112 CharUnits getVBaseOffset() const { in getVBaseOffset() 118 CharUnits getOffsetToTop() const { in getOffsetToTop() 175 VTableComponent(Kind ComponentKind, CharUnits Offset) { in VTableComponent() 194 CharUnits getOffset() const { in getOffset() 198 return CharUnits::fromQuantity(Value >> 3); in getOffset() 353 typedef llvm::DenseMap<ClassPairTy, CharUnits> [all …]
|
D | BaseSubobject.h | 33 CharUnits BaseOffset; 37 BaseSubobject(const CXXRecordDecl *Base, CharUnits BaseOffset) in BaseSubobject() 44 CharUnits getBaseOffset() const { return BaseOffset; } in getBaseOffset() 59 clang::CharUnits::fromQuantity(DenseMapInfo<int64_t>::getEmptyKey())); 65 clang::CharUnits::fromQuantity(DenseMapInfo<int64_t>::getTombstoneKey())); 69 typedef std::pair<const clang::CXXRecordDecl *, clang::CharUnits> PairTy;
|
D | VTTBuilder.h | 30 CharUnits BaseOffset; 34 VTTVTable(const CXXRecordDecl *Base, CharUnits BaseOffset, bool BaseIsVirtual) in VTTVTable() 44 CharUnits getBaseOffset() const { in getBaseOffset()
|
/external/clang/lib/CodeGen/ |
D | CodeGenTypeCache.h | 69 CharUnits getIntSize() const { in getIntSize() 70 return CharUnits::fromQuantity(IntSizeInBytes); in getIntSize() 72 CharUnits getIntAlign() const { in getIntAlign() 73 return CharUnits::fromQuantity(IntAlignInBytes); in getIntAlign() 86 CharUnits getSizeSize() const { in getSizeSize() 87 return CharUnits::fromQuantity(SizeSizeInBytes); in getSizeSize() 89 CharUnits getSizeAlign() const { in getSizeAlign() 90 return CharUnits::fromQuantity(SizeAlignInBytes); in getSizeAlign() 92 CharUnits getPointerSize() const { in getPointerSize() 93 return CharUnits::fromQuantity(PointerSizeInBytes); in getPointerSize() [all …]
|
D | CGRecordLayoutBuilder.cpp | 79 CharUnits Offset; 86 MemberInfo(CharUnits Offset, InfoKind Kind, llvm::Type *Data, in MemberInfo() 89 MemberInfo(CharUnits Offset, InfoKind Kind, llvm::Type *Data, in MemberInfo() 99 MemberInfo StorageInfo(CharUnits Offset, llvm::Type *Data) { in StorageInfo() 127 llvm::Type *getByteArrayType(CharUnits NumBytes) { in getByteArrayType() 130 return NumBytes == CharUnits::One() ? Type : in getByteArrayType() 146 CharUnits bitsToCharUnits(uint64_t BitOffset) { in bitsToCharUnits() 149 CharUnits getSize(llvm::Type *Type) { in getSize() 150 return CharUnits::fromQuantity(DataLayout.getTypeAllocSize(Type)); in getSize() 152 CharUnits getAlignment(llvm::Type *Type) { in getAlignment() [all …]
|
D | CGBlocks.h | 148 CharUnits ByrefAlignment; 149 CharUnits FieldOffset; 164 CharUnits::QuantityType Offset; 174 CharUnits getOffset() const { in getOffset() 176 return CharUnits::fromQuantity(Offset); in getOffset() 192 static Capture makeIndex(unsigned index, CharUnits offset) { in makeIndex() 232 CharUnits BlockSize; 233 CharUnits BlockAlign; 234 CharUnits CXXThisOffset; 239 CharUnits BlockHeaderForcedGapOffset; [all …]
|
D | CGBuilder.h | 69 llvm::ConstantInt *getSize(CharUnits N) { in getSize() 99 llvm::LoadInst *CreateAlignedLoad(llvm::Value *Addr, CharUnits Align, 103 llvm::LoadInst *CreateAlignedLoad(llvm::Value *Addr, CharUnits Align, in CreateAlignedLoad() 108 CharUnits Align, 113 llvm::LoadInst *CreateAlignedLoad(llvm::Value *Addr, CharUnits Align, 129 CharUnits Align, bool IsVolatile = false) { 158 return CreateAlignedLoad(getInt1Ty(), Addr, CharUnits::One(), Name); 164 return CreateAlignedStore(getInt1(Value), Addr, CharUnits::One()); in CreateFlagStore() 191 Address CreateStructGEP(Address Addr, unsigned Index, CharUnits Offset, 208 Address CreateConstArrayGEP(Address Addr, uint64_t Index, CharUnits EltSize, [all …]
|
D | CGCXXABI.cpp | 143 CharUnits offset) { in EmitMemberDataPointer() 193 CharUnits CGCXXABI::GetArrayCookieSize(const CXXNewExpr *expr) { in GetArrayCookieSize() 195 return CharUnits::Zero(); in GetArrayCookieSize() 199 CharUnits CGCXXABI::getArrayCookieSizeImpl(QualType elementType) { in getArrayCookieSizeImpl() 201 return CharUnits::Zero(); in getArrayCookieSizeImpl() 236 llvm::Value *&allocPtr, CharUnits &cookieSize) { in ReadArrayCookie() 244 cookieSize = CharUnits::Zero(); in ReadArrayCookie() 257 CharUnits cookieSize) { in readArrayCookieImpl() 283 CharUnits CGCXXABI::getMemberPointerPathAdjustment(const APValue &MP) { in getMemberPointerPathAdjustment() 287 CharUnits ThisAdjustment = CharUnits::Zero(); in getMemberPointerPathAdjustment() [all …]
|
D | Address.h | 27 CharUnits Alignment; 29 Address(llvm::Value *pointer, CharUnits alignment) in Address() 35 static Address invalid() { return Address(nullptr, CharUnits()); } in invalid() 67 CharUnits getAlignment() const { in getAlignment() 77 ConstantAddress(llvm::Constant *pointer, CharUnits alignment) in ConstantAddress() 81 return ConstantAddress(nullptr, CharUnits()); in invalid()
|
D | CGExprConstant.cpp | 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() [all …]
|
D | TargetInfo.cpp | 67 Builder.CreateAlignedStore(Value, Cell, CharUnits::One()); in AssignToArrayRange() 193 CharUnits Align) { in emitRoundPointerUpToAlignment() 224 CharUnits DirectSize, in emitVoidPtrDirectVAArg() 225 CharUnits DirectAlign, in emitVoidPtrDirectVAArg() 226 CharUnits SlotSize, in emitVoidPtrDirectVAArg() 245 CharUnits FullDirectSize = DirectSize.RoundUpToAlignment(SlotSize); in emitVoidPtrDirectVAArg() 276 std::pair<CharUnits, CharUnits> ValueInfo, in emitVoidPtrVAArg() argument 277 CharUnits SlotSizeAndAlign, in emitVoidPtrVAArg() 280 CharUnits DirectSize, DirectAlign; in emitVoidPtrVAArg() 315 CharUnits Align = std::min(Addr1.getAlignment(), Addr2.getAlignment()); in emitMergePHI() [all …]
|
D | CGExprCXX.cpp | 359 CharUnits NVSize = Layout.getNonVirtualSize(); in EmitNullBaseClassInitialization() 364 SmallVector<std::pair<CharUnits, CharUnits>, 1> Stores; in EmitNullBaseClassInitialization() 365 Stores.emplace_back(CharUnits::Zero(), NVSize); in EmitNullBaseClassInitialization() 368 CharUnits VBPtrWidth = CGF.getPointerSize(); in EmitNullBaseClassInitialization() 369 std::vector<CharUnits> VBPtrOffsets = in EmitNullBaseClassInitialization() 371 for (CharUnits VBPtrOffset : VBPtrOffsets) { in EmitNullBaseClassInitialization() 372 std::pair<CharUnits, CharUnits> LastStore = Stores.pop_back_val(); in EmitNullBaseClassInitialization() 373 CharUnits LastStoreOffset = LastStore.first; in EmitNullBaseClassInitialization() 374 CharUnits LastStoreSize = LastStore.second; in EmitNullBaseClassInitialization() 376 CharUnits SplitBeforeOffset = LastStoreOffset; in EmitNullBaseClassInitialization() [all …]
|
D | CGBlocks.cpp | 192 CharUnits Alignment; 193 CharUnits Size; 198 BlockLayoutChunk(CharUnits align, CharUnits size, in BlockLayoutChunk() 206 void setIndex(CGBlockInfo &info, unsigned index, CharUnits offset) { in setIndex() 289 static CharUnits getLowBit(CharUnits v) { in getLowBit() 290 return CharUnits::fromQuantity(v.getQuantity() & (~v.getQuantity() + 1)); in getLowBit() 339 CharUnits maxFieldAlign; in computeBlockInfo() 350 std::pair<CharUnits,CharUnits> tinfo in computeBlockInfo() 368 CharUnits align = CGM.getPointerAlign(); in computeBlockInfo() 429 CharUnits size = C.getTypeSizeInChars(VT); in computeBlockInfo() [all …]
|
D | CGClass.cpp | 35 CharUnits CodeGenModule::getClassPointerAlignment(const CXXRecordDecl *RD) { in getClassPointerAlignment() 37 return CharUnits::One(); // Hopefully won't be used anywhere. in getClassPointerAlignment() 54 CharUnits CodeGenModule::getVBaseAlignment(CharUnits actualDerivedAlign, in getVBaseAlignment() 62 CharUnits expectedVBaseAlign = baseLayout.getNonVirtualAlignment(); in getVBaseAlignment() 68 CharUnits 69 CodeGenModule::getDynamicOffsetAlignment(CharUnits actualBaseAlign, in getDynamicOffsetAlignment() 71 CharUnits expectedTargetAlign) { in getDynamicOffsetAlignment() 78 CharUnits expectedBaseAlign = baseLayout.getNonVirtualAlignment(); in getDynamicOffsetAlignment() 138 CharUnits memberAlign = getNaturalTypeAlignment(memberType, alignSource); in EmitCXXMemberDataPointerAddress() 146 CharUnits CodeGenModule::computeNonVirtualBaseClassOffset( in computeNonVirtualBaseClassOffset() [all …]
|
D | CGCXXABI.h | 186 CharUnits offset); 217 CharUnits getMemberPointerPathAdjustment(const APValue &MP); 387 CharUnits VPtrOffset) = 0; 429 virtual std::vector<CharUnits> getVBPtrOffsets(const CXXRecordDecl *RD); 448 virtual CharUnits GetArrayCookieSize(const CXXNewExpr *expr); 481 llvm::Value *&AllocPtr, CharUnits &CookieSize); 490 virtual CharUnits getArrayCookieSizeImpl(QualType elementType); 502 CharUnits cookieSize);
|
D | CGObjCMac.cpp | 798 CharUnits block_var_bytepos; 799 CharUnits block_var_size; 801 CharUnits BytePos = CharUnits::Zero(), in RUN_SKIP() 802 CharUnits Size = CharUnits::Zero()) in RUN_SKIP() 921 CharUnits beginOffset, 922 CharUnits endOffset, 927 CharUnits beginOffset, in BuildStrongIvarLayout() 928 CharUnits endOffset) { in BuildStrongIvarLayout() 933 CharUnits beginOffset, in BuildWeakIvarLayout() 934 CharUnits endOffset, in BuildWeakIvarLayout() [all …]
|
/external/clang/lib/AST/ |
D | RecordLayoutBuilder.cpp | 73 llvm::DenseMap<const CXXRecordDecl *, CharUnits> BaseOffsets; 76 llvm::DenseMap<const CXXRecordDecl *, CharUnits> VirtualBaseOffsets; 86 bool getExternalNVBaseOffset(const CXXRecordDecl *RD, CharUnits &BaseOffset) { in getExternalNVBaseOffset() 94 bool getExternalVBaseOffset(const CXXRecordDecl *RD, CharUnits &BaseOffset) { in getExternalVBaseOffset() 114 typedef llvm::DenseMap<CharUnits, ClassVectorTy> EmptyClassOffsetsMapTy; 119 CharUnits MaxEmptyClassOffset; 125 void AddSubobjectAtOffset(const CXXRecordDecl *RD, CharUnits Offset); 128 CharUnits Offset, bool PlacingEmptyBase); 132 CharUnits Offset); 133 void UpdateEmptyFieldSubobjects(const FieldDecl *FD, CharUnits Offset); [all …]
|
D | RecordLayout.cpp | 31 ASTRecordLayout::ASTRecordLayout(const ASTContext &Ctx, CharUnits size, in ASTRecordLayout() 32 CharUnits alignment, in ASTRecordLayout() 33 CharUnits requiredAlignment, in ASTRecordLayout() 34 CharUnits datasize, in ASTRecordLayout() 48 CharUnits size, CharUnits alignment, in ASTRecordLayout() 49 CharUnits requiredAlignment, in ASTRecordLayout() 51 CharUnits vbptroffset, in ASTRecordLayout() 52 CharUnits datasize, in ASTRecordLayout() 55 CharUnits nonvirtualsize, in ASTRecordLayout() 56 CharUnits nonvirtualalignment, in ASTRecordLayout() [all …]
|
D | VTableBuilder.cpp | 48 CharUnits NonVirtualOffset; 51 NonVirtualOffset(CharUnits::Zero()) { } in BaseOffset() 53 const CXXRecordDecl *VirtualBase, CharUnits NonVirtualOffset) in BaseOffset() 74 CharUnits Offset; 77 Offset(CharUnits::Zero()) { } in OverriderInfo() 88 const CharUnits MostDerivedClassOffset; 102 typedef std::pair<const CXXMethodDecl *, CharUnits> MethodBaseOffsetPairTy; 115 CharUnits> SubobjectOffsetMapTy; 122 CharUnits OffsetInLayoutClass, 136 CharUnits MostDerivedClassOffset, [all …]
|
D | VTTBuilder.cpp | 35 LayoutVTT(BaseSubobject(MostDerivedClass, CharUnits::Zero()), in VTTBuilder() 68 CharUnits BaseOffset = Base.getBaseOffset() + in LayoutSecondaryVTTs() 105 CharUnits BaseOffset; in LayoutSecondaryVirtualPointers() 163 CharUnits BaseOffset = in LayoutVirtualVTTs()
|
/external/clang/lib/StaticAnalyzer/Checkers/ |
D | PaddingChecker.cpp | 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() [all …]
|
D | CastSizeChecker.cpp | 49 static bool evenFlexibleArraySize(ASTContext &Ctx, CharUnits RegionSize, in evenFlexibleArraySize() 50 CharUnits TypeSize, QualType ToPointeeTy) { in evenFlexibleArraySize() 64 CharUnits FlexSize; in evenFlexibleArraySize() 81 CharUnits Left = RegionSize - TypeSize; in evenFlexibleArraySize() 121 CharUnits regionSize = CharUnits::fromQuantity(extentInt->getSExtValue()); in checkPreStmt() 122 CharUnits typeSize = C.getASTContext().getTypeSizeInChars(ToPointeeTy); in checkPreStmt()
|
/external/clang/include/clang/CodeGen/ |
D | CGFunctionInfo.h | 130 static ABIArgInfo getIndirect(CharUnits Alignment, bool ByVal = true, 141 static ABIArgInfo getIndirectInReg(CharUnits Alignment, bool ByVal = true, 215 CharUnits getIndirectAlign() const { in getIndirectAlign() 217 return CharUnits::fromQuantity(IndirectAlign); in getIndirectAlign() 219 void setIndirectAlign(CharUnits IA) { in setIndirectAlign() 468 CharUnits getArgStructAlignment() const { in getArgStructAlignment() 469 return CharUnits::fromQuantity(ArgStructAlign); in getArgStructAlignment() 471 void setArgStruct(llvm::StructType *Ty, CharUnits Align) { in setArgStruct()
|