Lines Matching refs:Type

26 #include "llvm/IR/Type.h"
35 /// llvm::Type. Some of the lowering is straightforward, some is not. Here we
38 /// llvm::Type with correct size. We choose a field via a specific heuristic
81 llvm::Type *Data;
86 MemberInfo(CharUnits Offset, InfoKind Kind, llvm::Type *Data,
89 MemberInfo(CharUnits Offset, InfoKind Kind, llvm::Type *Data,
98 /// \brief Constructs a MemberInfo instance from an offset and llvm::Type *.
99 MemberInfo StorageInfo(CharUnits Offset, llvm::Type *Data) {
121 /// \brief Wraps llvm::Type::getIntNTy with some implicit arguments.
122 llvm::Type *getIntNType(uint64_t NumBits) {
123 return llvm::Type::getIntNTy(Types.getLLVMContext(),
127 llvm::Type *getByteArrayType(CharUnits NumBytes) {
129 llvm::Type *Type = llvm::Type::getInt8Ty(Types.getLLVMContext());
130 return NumBytes == CharUnits::One() ? Type :
131 (llvm::Type *)llvm::ArrayType::get(Type, NumBytes.getQuantity());
135 llvm::Type *getStorageType(const FieldDecl *FD) {
136 llvm::Type *Type = Types.ConvertTypeForMem(FD->getType());
137 if (!FD->isBitField()) return Type;
138 if (isDiscreteBitFieldABI()) return Type;
140 (unsigned)Context.toBits(getSize(Type))));
143 llvm::Type *getStorageType(const CXXRecordDecl *RD) {
149 CharUnits getSize(llvm::Type *Type) {
150 return CharUnits::fromQuantity(DataLayout.getTypeAllocSize(Type));
152 CharUnits getAlignment(llvm::Type *Type) {
153 return CharUnits::fromQuantity(DataLayout.getABITypeAlignment(Type));
170 llvm::Type *StorageType);
203 SmallVector<llvm::Type *, 16> FieldTypes;
225 const FieldDecl *FD, CharUnits StartOffset, llvm::Type *StorageType) {
288 llvm::Type *StorageType = nullptr;
300 llvm::Type *FieldType = getStorageType(Field);
306 llvm::Type *FieldType = getStorageType(Field);
387 llvm::Type *Type = Types.ConvertTypeForMem(Field->getType());
393 Tail = StartBitOffset + DataLayout.getTypeAllocSizeInBits(Type);
397 Members.push_back(StorageInfo(bitsToCharUnits(StartBitOffset), Type));
429 llvm::Type *Type = getIntNType(Tail - StartBitOffset);
433 Members.push_back(StorageInfo(bitsToCharUnits(StartBitOffset), Type));
470 llvm::Type::getInt32PtrTy(Types.getLLVMContext())));
654 llvm::Type *Ty = Types.ConvertTypeForMem(FD->getType());
741 "Type size mismatch!");
751 "Type size mismatch!");
782 llvm::Type *ElementTy = ST->getTypeAtIndex(RL->getLLVMFieldNo(FD));