Lines Matching refs:FD
83 const FieldDecl *FD;
87 const FieldDecl *FD = nullptr)
88 : Offset(Offset), Kind(Kind), Data(Data), FD(FD) {}
135 llvm::Type *getStorageType(const FieldDecl *FD) {
136 llvm::Type *Type = Types.ConvertTypeForMem(FD->getType());
137 if (!FD->isBitField()) return Type;
139 return getIntNType(std::min(FD->getBitWidthValue(Context),
155 bool isZeroInitializable(const FieldDecl *FD) {
156 return Types.isZeroInitializable(FD->getType());
165 uint64_t getFieldBitOffset(const FieldDecl *FD) {
166 return Layout.getFieldOffset(FD->getFieldIndex());
169 void setBitFieldInfo(const FieldDecl *FD, CharUnits StartOffset,
225 const FieldDecl *FD, CharUnits StartOffset, llvm::Type *StorageType) {
226 CGBitFieldInfo &Info = BitFields[FD->getCanonicalDecl()];
227 Info.IsSigned = FD->getType()->isSignedIntegerOrEnumerationType();
228 Info.Offset = (unsigned)(getFieldBitOffset(FD) - Context.toBits(StartOffset));
229 Info.Size = FD->getBitWidthValue(Context);
532 if (!Member->FD || isZeroInitializable(Member->FD))
556 assert(Prior->Kind == MemberInfo::Field && !Prior->FD &&
634 if (Member->FD)
635 Fields[Member->FD->getCanonicalDecl()] = FieldTypes.size() - 1;
638 setBitFieldInfo(Member->FD, Member->Offset, FieldTypes.back());
647 const FieldDecl *FD,
654 llvm::Type *Ty = Types.ConvertTypeForMem(FD->getType());
659 bool IsSigned = FD->getType()->isSignedIntegerOrEnumerationType();
762 const FieldDecl *FD = *it;
766 if (!FD->isBitField()) {
767 unsigned FieldNo = RL->getLLVMFieldNo(FD);
774 if (!FD->getDeclName())
778 if (FD->getBitWidthValue(getContext()) == 0)
781 const CGBitFieldInfo &Info = RL->getBitFieldInfo(FD);
782 llvm::Type *ElementTy = ST->getTypeAtIndex(RL->getLLVMFieldNo(FD));