Lines Matching defs:Ty

53 llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty,
56 return new llvm::AllocaInst(Ty, 0, "", AllocaInsertPt);
57 return new llvm::AllocaInst(Ty, 0, Name, AllocaInsertPt);
67 llvm::AllocaInst *CodeGenFunction::CreateIRTemp(QualType Ty,
69 llvm::AllocaInst *Alloc = CreateTempAlloca(ConvertType(Ty), Name);
71 CharUnits Align = getContext().getTypeAlignInChars(Ty);
76 llvm::AllocaInst *CodeGenFunction::CreateMemTemp(QualType Ty,
78 llvm::AllocaInst *Alloc = CreateTempAlloca(ConvertTypeForMem(Ty), Name);
80 CharUnits Align = getContext().getTypeAlignInChars(Ty);
414 QualType Ty = E->getType();
415 EmitTypeCheck(TCK_ReferenceBinding, E->getExprLoc(), Value, Ty);
444 QualType Ty, CharUnits Alignment) {
473 if (SanOpts->ObjectSize && !Ty->isIncompleteType()) {
474 uint64_t Size = getContext().getTypeSizeInChars(Ty).getQuantity();
494 if (!Ty->isIncompleteType() && !AlignVal)
495 AlignVal = getContext().getTypeAlignInChars(Ty).getQuantity();
511 EmitCheckTypeDescriptor(Ty),
519 // type Ty at offset zero within this object.
526 CXXRecordDecl *RD = Ty->getAsCXXRecordDecl();
538 CGM.getCXXABI().getMangleContext().mangleCXXRTTI(Ty.getUnqualifiedType(),
570 EmitCheckTypeDescriptor(Ty),
571 CGM.GetAddrOfRTTIDescriptor(Ty.getUnqualifiedType()),
705 RValue CodeGenFunction::GetUndefRValue(QualType Ty) {
706 if (Ty->isVoidType())
709 switch (getEvaluationKind(Ty)) {
712 ConvertType(Ty->castAs<ComplexType>()->getElementType());
721 llvm::Value *DestPtr = CreateMemTemp(Ty, "undef.agg.tmp");
726 return RValue::get(llvm::UndefValue::get(ConvertType(Ty)));
740 llvm::Type *Ty = llvm::PointerType::getUnqual(ConvertType(E->getType()));
741 return MakeAddrLValue(llvm::UndefValue::get(Ty), E->getType());
998 static bool hasBooleanRepresentation(QualType Ty) {
999 if (Ty->isBooleanType())
1002 if (const EnumType *ET = Ty->getAs<EnumType>())
1005 if (const AtomicType *AT = Ty->getAs<AtomicType>())
1011 static bool getRangeForType(CodeGenFunction &CGF, QualType Ty,
1014 const EnumType *ET = Ty->getAs<EnumType>();
1017 bool IsBool = hasBooleanRepresentation(Ty);
1022 Min = llvm::APInt(CGF.getContext().getTypeSize(Ty), 0);
1023 End = llvm::APInt(CGF.getContext().getTypeSize(Ty), 2);
1045 llvm::MDNode *CodeGenFunction::getRangeForLoadFromType(QualType Ty) {
1047 if (!getRangeForType(*this, Ty, Min, End,
1056 unsigned Alignment, QualType Ty,
1062 if (Ty->isVectorType()) {
1095 return EmitFromMemory(V, Ty);
1100 if (Ty->isAtomicType()) {
1101 LValue lvalue = LValue::MakeAddr(Addr, Ty,
1119 if ((SanOpts->Bool && hasBooleanRepresentation(Ty)) ||
1120 (SanOpts->Enum && Ty->getAs<EnumType>())) {
1122 if (getRangeForType(*this, Ty, Min, End, true)) {
1137 EmitCheckTypeDescriptor(Ty)
1143 if (llvm::MDNode *RangeInfo = getRangeForLoadFromType(Ty))
1146 return EmitFromMemory(Load, Ty);
1149 llvm::Value *CodeGenFunction::EmitToMemory(llvm::Value *Value, QualType Ty) {
1151 if (hasBooleanRepresentation(Ty)) {
1155 return Builder.CreateZExt(Value, ConvertTypeForMem(Ty), "frombool");
1156 assert(Value->getType()->isIntegerTy(getContext().getTypeSize(Ty)) &&
1163 llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) {
1165 if (hasBooleanRepresentation(Ty)) {
1166 assert(Value->getType()->isIntegerTy(getContext().getTypeSize(Ty)) &&
1176 QualType Ty, llvm::MDNode *TBAAInfo,
1181 if (Ty->isVectorType()) {
1212 Value = EmitToMemory(Value, Ty);
1214 if (Ty->isAtomicType()) {
1216 LValue::MakeAddr(Addr, Ty,
1349 /// is 'Ty'.
1914 QualType Ty, SourceLocation Loc,
1921 Ty, Loc);
1929 Context.getTypeAlignInChars(Ty).getQuantity();