Lines Matching refs:Ty
530 llvm::DIType CGDebugInfo::CreateType(const ComplexType *Ty) { in CreateType() argument
533 if (Ty->isComplexIntegerType()) in CreateType()
536 uint64_t Size = CGM.getContext().getTypeSize(Ty); in CreateType()
537 uint64_t Align = CGM.getContext().getTypeAlign(Ty); in CreateType()
546 llvm::DIType CGDebugInfo::CreateQualifiedType(QualType Ty, llvm::DIFile Unit) { in CreateQualifiedType() argument
548 const Type *T = Qc.strip(Ty); in CreateQualifiedType()
581 llvm::DIType CGDebugInfo::CreateType(const ObjCObjectPointerType *Ty, in CreateType() argument
587 if (Ty->isObjCQualifiedIdType()) in CreateType()
591 Ty, Ty->getPointeeType(), Unit); in CreateType()
595 llvm::DIType CGDebugInfo::CreateType(const PointerType *Ty, llvm::DIFile Unit) { in CreateType() argument
596 return CreatePointerLikeType(llvm::dwarf::DW_TAG_pointer_type, Ty, in CreateType()
597 Ty->getPointeeType(), Unit); in CreateType()
602 static SmallString<256> getUniqueTagTypeName(const TagType *Ty, in getUniqueTagTypeName() argument
608 const TagDecl *TD = Ty->getDecl(); in getUniqueTagTypeName()
619 CGM.getCXXABI().getMangleContext().mangleCXXRTTIName(QualType(Ty, 0), Out); in getUniqueTagTypeName()
641 CGDebugInfo::getOrCreateRecordFwdDecl(const RecordType *Ty, in getOrCreateRecordFwdDecl() argument
643 const RecordDecl *RD = Ty->getDecl(); in getOrCreateRecordFwdDecl()
655 Size = CGM.getContext().getTypeSize(Ty); in getOrCreateRecordFwdDecl()
656 Align = CGM.getContext().getTypeAlign(Ty); in getOrCreateRecordFwdDecl()
660 SmallString<256> FullName = getUniqueTagTypeName(Ty, CGM, TheCU); in getOrCreateRecordFwdDecl()
665 std::piecewise_construct, std::make_tuple(Ty), in getOrCreateRecordFwdDecl()
671 const Type *Ty, in CreatePointerLikeType() argument
683 uint64_t Align = CGM.getContext().getTypeAlign(Ty); in CreatePointerLikeType()
700 llvm::DIType CGDebugInfo::CreateType(const BlockPointerType *Ty, in CreateType() argument
729 uint64_t Size = CGM.getContext().getTypeSize(Ty); in CreateType()
739 FType = CGM.getContext().getPointerType(Ty->getPointeeType()); in CreateType()
744 FieldSize = CGM.getContext().getTypeSize(Ty); in CreateType()
745 FieldAlign = CGM.getContext().getTypeAlign(Ty); in CreateType()
762 llvm::DIType CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, in CreateType() argument
764 assert(Ty->isTypeAlias()); in CreateType()
765 llvm::DIType Src = getOrCreateType(Ty->getAliasedType(), Unit); in CreateType()
769 Ty->getTemplateName().print(OS, CGM.getContext().getPrintingPolicy(), in CreateType()
773 OS, Ty->getArgs(), Ty->getNumArgs(), in CreateType()
777 Ty->getTemplateName().getAsTemplateDecl())->getTemplatedDecl(); in CreateType()
785 llvm::DIType CGDebugInfo::CreateType(const TypedefType *Ty, llvm::DIFile Unit) { in CreateType() argument
788 SourceLocation Loc = Ty->getDecl()->getLocation(); in CreateType()
792 getOrCreateType(Ty->getDecl()->getUnderlyingType(), Unit), in CreateType()
793 Ty->getDecl()->getName(), getOrCreateFile(Loc), getLineNumber(Loc), in CreateType()
794 getContextDescriptor(cast<Decl>(Ty->getDecl()->getDeclContext()))); in CreateType()
797 llvm::DIType CGDebugInfo::CreateType(const FunctionType *Ty, in CreateType() argument
802 EltTys.push_back(getOrCreateType(Ty->getReturnType(), Unit)); in CreateType()
806 if (isa<FunctionNoProtoType>(Ty)) in CreateType()
808 else if (const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(Ty)) { in CreateType()
1457 QualType Ty = CGM.getContext().getEnumType(ED); in completeType() local
1458 void *TyPtr = Ty.getAsOpaquePtr(); in completeType()
1462 llvm::DIType Res = CreateTypeDefinition(Ty->castAs<EnumType>()); in completeType()
1481 QualType Ty = CGM.getContext().getRecordType(RD); in completeRequiredType() local
1482 llvm::DIType T = getTypeOrNull(Ty); in completeRequiredType()
1490 QualType Ty = CGM.getContext().getRecordType(RD); in completeClassData() local
1491 void *TyPtr = Ty.getAsOpaquePtr(); in completeClassData()
1495 llvm::DIType Res = CreateTypeDefinition(Ty->castAs<RecordType>()); in completeClassData()
1544 llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty) { in CreateType() argument
1545 RecordDecl *RD = Ty->getDecl(); in CreateType()
1546 llvm::DIType T = cast_or_null<llvm::MDType>(getTypeOrNull(QualType(Ty, 0))); in CreateType()
1550 Ty, getContextDescriptor(cast<Decl>(RD->getDeclContext()))); in CreateType()
1554 return CreateTypeDefinition(Ty); in CreateType()
1557 llvm::DIType CGDebugInfo::CreateTypeDefinition(const RecordType *Ty) { in CreateTypeDefinition() argument
1558 RecordDecl *RD = Ty->getDecl(); in CreateTypeDefinition()
1571 cast<llvm::MDCompositeType>(getOrCreateLimitedType(Ty, DefUnit)); in CreateTypeDefinition()
1582 RegionMap[Ty->getDecl()].reset(FwdDecl); in CreateTypeDefinition()
1604 RegionMap.erase(Ty->getDecl()); in CreateTypeDefinition()
1613 RegionMap[Ty->getDecl()].reset(FwdDecl); in CreateTypeDefinition()
1618 llvm::DIType CGDebugInfo::CreateType(const ObjCObjectType *Ty, in CreateType() argument
1621 return getOrCreateType(Ty->getBaseType(), Unit); in CreateType()
1649 llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, in CreateType() argument
1651 ObjCInterfaceDecl *ID = Ty->getDecl(); in CreateType()
1668 ObjCInterfaceCache.push_back(ObjCInterfaceCacheEntry(Ty, FwdDecl, Unit)); in CreateType()
1672 return CreateTypeDefinition(Ty, Unit); in CreateType()
1675 llvm::DIType CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty, in CreateTypeDefinition() argument
1677 ObjCInterfaceDecl *ID = Ty->getDecl(); in CreateTypeDefinition()
1683 uint64_t Size = CGM.getContext().getTypeSize(Ty); in CreateTypeDefinition()
1684 uint64_t Align = CGM.getContext().getTypeAlign(Ty); in CreateTypeDefinition()
1694 QualType QTy(Ty, 0); in CreateTypeDefinition()
1699 RegionMap[Ty->getDecl()].reset(RealDecl); in CreateTypeDefinition()
1820 llvm::DIType CGDebugInfo::CreateType(const VectorType *Ty, llvm::DIFile Unit) { in CreateType() argument
1821 llvm::DIType ElementTy = getOrCreateType(Ty->getElementType(), Unit); in CreateType()
1822 int64_t Count = Ty->getNumElements(); in CreateType()
1831 uint64_t Size = CGM.getContext().getTypeSize(Ty); in CreateType()
1832 uint64_t Align = CGM.getContext().getTypeAlign(Ty); in CreateType()
1837 llvm::DIType CGDebugInfo::CreateType(const ArrayType *Ty, llvm::DIFile Unit) { in CreateType() argument
1842 if (const VariableArrayType *VAT = dyn_cast<VariableArrayType>(Ty)) { in CreateType()
1846 } else if (Ty->isIncompleteArrayType()) { in CreateType()
1848 if (Ty->getElementType()->isIncompleteType()) in CreateType()
1851 Align = CGM.getContext().getTypeAlign(Ty->getElementType()); in CreateType()
1852 } else if (Ty->isIncompleteType()) { in CreateType()
1857 Size = CGM.getContext().getTypeSize(Ty); in CreateType()
1858 Align = CGM.getContext().getTypeAlign(Ty); in CreateType()
1865 QualType EltTy(Ty, 0); in CreateType()
1866 while ((Ty = dyn_cast<ArrayType>(EltTy))) { in CreateType()
1875 if (const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(Ty)) in CreateType()
1880 EltTy = Ty->getElementType(); in CreateType()
1890 llvm::DIType CGDebugInfo::CreateType(const LValueReferenceType *Ty, in CreateType() argument
1892 return CreatePointerLikeType(llvm::dwarf::DW_TAG_reference_type, Ty, in CreateType()
1893 Ty->getPointeeType(), Unit); in CreateType()
1896 llvm::DIType CGDebugInfo::CreateType(const RValueReferenceType *Ty, in CreateType() argument
1898 return CreatePointerLikeType(llvm::dwarf::DW_TAG_rvalue_reference_type, Ty, in CreateType()
1899 Ty->getPointeeType(), Unit); in CreateType()
1902 llvm::DIType CGDebugInfo::CreateType(const MemberPointerType *Ty, in CreateType() argument
1904 llvm::DIType ClassType = getOrCreateType(QualType(Ty->getClass(), 0), U); in CreateType()
1905 if (!Ty->getPointeeType()->isFunctionType()) in CreateType()
1907 getOrCreateType(Ty->getPointeeType(), U), ClassType, in CreateType()
1908 CGM.getContext().getTypeSize(Ty)); in CreateType()
1911 Ty->getPointeeType()->getAs<FunctionProtoType>(); in CreateType()
1914 Ty->getClass(), FPT->getTypeQuals())), in CreateType()
1916 ClassType, CGM.getContext().getTypeSize(Ty)); in CreateType()
1919 llvm::DIType CGDebugInfo::CreateType(const AtomicType *Ty, llvm::DIFile U) { in CreateType() argument
1922 return getOrCreateType(Ty->getValueType(), U); in CreateType()
1926 llvm::DIType CGDebugInfo::CreateEnumType(const EnumType *Ty) { in CreateEnumType() argument
1927 const EnumDecl *ED = Ty->getDecl(); in CreateEnumType()
1935 SmallString<256> FullName = getUniqueTagTypeName(Ty, CGM, TheCU); in CreateEnumType()
1949 std::piecewise_construct, std::make_tuple(Ty), in CreateEnumType()
1954 return CreateTypeDefinition(Ty); in CreateEnumType()
1957 llvm::DIType CGDebugInfo::CreateTypeDefinition(const EnumType *Ty) { in CreateTypeDefinition() argument
1958 const EnumDecl *ED = Ty->getDecl(); in CreateTypeDefinition()
1966 SmallString<256> FullName = getUniqueTagTypeName(Ty, CGM, TheCU); in CreateTypeDefinition()
2049 llvm::DIType CGDebugInfo::getTypeOrNull(QualType Ty) { in getTypeOrNull() argument
2052 Ty = UnwrapTypeForDebugInfo(Ty, CGM.getContext()); in getTypeOrNull()
2054 auto it = TypeCache.find(Ty.getAsOpaquePtr()); in getTypeOrNull()
2077 llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, llvm::DIFile Unit) { in getOrCreateType() argument
2078 if (Ty.isNull()) in getOrCreateType()
2082 Ty = UnwrapTypeForDebugInfo(Ty, CGM.getContext()); in getOrCreateType()
2084 if (llvm::DIType T = getTypeOrNull(Ty)) in getOrCreateType()
2088 llvm::DIType Res = CreateTypeNode(Ty, Unit); in getOrCreateType()
2089 void *TyPtr = Ty.getAsOpaquePtr(); in getOrCreateType()
2111 ObjCInterfaceDecl *CGDebugInfo::getObjCInterfaceDecl(QualType Ty) { in getObjCInterfaceDecl() argument
2112 switch (Ty->getTypeClass()) { in getObjCInterfaceDecl()
2115 cast<ObjCObjectPointerType>(Ty)->getPointeeType()); in getObjCInterfaceDecl()
2117 return cast<ObjCInterfaceType>(Ty)->getDecl(); in getObjCInterfaceDecl()
2124 llvm::DIType CGDebugInfo::CreateTypeNode(QualType Ty, llvm::DIFile Unit) { in CreateTypeNode() argument
2126 if (Ty.hasLocalQualifiers()) in CreateTypeNode()
2127 return CreateQualifiedType(Ty, Unit); in CreateTypeNode()
2130 switch (Ty->getTypeClass()) { in CreateTypeNode()
2140 return CreateType(cast<VectorType>(Ty), Unit); in CreateTypeNode()
2142 return CreateType(cast<ObjCObjectPointerType>(Ty), Unit); in CreateTypeNode()
2144 return CreateType(cast<ObjCObjectType>(Ty), Unit); in CreateTypeNode()
2146 return CreateType(cast<ObjCInterfaceType>(Ty), Unit); in CreateTypeNode()
2148 return CreateType(cast<BuiltinType>(Ty)); in CreateTypeNode()
2150 return CreateType(cast<ComplexType>(Ty)); in CreateTypeNode()
2152 return CreateType(cast<PointerType>(Ty), Unit); in CreateTypeNode()
2157 cast<PointerType>(cast<AdjustedType>(Ty)->getAdjustedType()), Unit); in CreateTypeNode()
2159 return CreateType(cast<BlockPointerType>(Ty), Unit); in CreateTypeNode()
2161 return CreateType(cast<TypedefType>(Ty), Unit); in CreateTypeNode()
2163 return CreateType(cast<RecordType>(Ty)); in CreateTypeNode()
2165 return CreateEnumType(cast<EnumType>(Ty)); in CreateTypeNode()
2168 return CreateType(cast<FunctionType>(Ty), Unit); in CreateTypeNode()
2172 return CreateType(cast<ArrayType>(Ty), Unit); in CreateTypeNode()
2175 return CreateType(cast<LValueReferenceType>(Ty), Unit); in CreateTypeNode()
2177 return CreateType(cast<RValueReferenceType>(Ty), Unit); in CreateTypeNode()
2180 return CreateType(cast<MemberPointerType>(Ty), Unit); in CreateTypeNode()
2183 return CreateType(cast<AtomicType>(Ty), Unit); in CreateTypeNode()
2186 return CreateType(cast<TemplateSpecializationType>(Ty), Unit); in CreateTypeNode()
2206 llvm::DIType CGDebugInfo::getOrCreateLimitedType(const RecordType *Ty, in getOrCreateLimitedType() argument
2208 QualType QTy(Ty, 0); in getOrCreateLimitedType()
2219 llvm::MDCompositeType *Res = CreateLimitedType(Ty); in getOrCreateLimitedType()
2232 llvm::MDCompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) { in CreateLimitedType() argument
2233 RecordDecl *RD = Ty->getDecl(); in CreateLimitedType()
2254 return getOrCreateRecordFwdDecl(Ty, RDContext); in CreateLimitedType()
2256 uint64_t Size = CGM.getContext().getTypeSize(Ty); in CreateLimitedType()
2257 uint64_t Align = CGM.getContext().getTypeAlign(Ty); in CreateLimitedType()
2259 SmallString<256> FullName = getUniqueTagTypeName(Ty, CGM, TheCU); in CreateLimitedType()
2265 RegionMap[Ty->getDecl()].reset(RealDecl); in CreateLimitedType()
2266 TypeCache[QualType(Ty, 0).getAsOpaquePtr()].reset(RealDecl); in CreateLimitedType()
2305 llvm::DIType Ty = DBuilder.createMemberType(Unit, Name, Unit, 0, FieldSize, in CreateMemberType() local
2308 return Ty; in CreateMemberType()
2808 llvm::DIType Ty; in EmitDeclare() local
2811 Ty = EmitTypeForVarWithBlocksAttr(VD, &XOffset); in EmitDeclare()
2813 Ty = getOrCreateType(VD->getType(), Unit); in EmitDeclare()
2817 if (!Ty) in EmitDeclare()
2862 Tag, Scope, VD->getName(), Unit, Line, Ty, ArgNo); in EmitDeclare()
2900 DBuilder.createLocalVariable(Tag, Scope, Name, Unit, Line, Ty, in EmitDeclare()
2923 llvm::DIType Ty) { in CreateSelfType() argument
2926 Ty = CachedTy; in CreateSelfType()
2927 return DBuilder.createObjectPointerType(Ty); in CreateSelfType()
2943 llvm::DIType Ty; in EmitDeclareOfBlockDeclRefVariable() local
2945 Ty = EmitTypeForVarWithBlocksAttr(VD, &XOffset); in EmitDeclareOfBlockDeclRefVariable()
2947 Ty = getOrCreateType(VD->getType(), Unit); in EmitDeclareOfBlockDeclRefVariable()
2952 Ty = CreateSelfType(VD->getType(), Ty); in EmitDeclareOfBlockDeclRefVariable()
2987 Line, Ty); in EmitDeclareOfBlockDeclRefVariable()
3254 llvm::DIType Ty = getOrCreateType(VD->getType(), Unit); in EmitGlobalVariable() local
3258 Ty = getOrCreateType(QualType(ED->getTypeForDecl(), 0), Unit); in EmitGlobalVariable()
3261 if (Ty->getTag() == llvm::dwarf::DW_TAG_enumeration_type) in EmitGlobalVariable()
3284 DContext, Name, StringRef(), Unit, getLineNumber(VD->getLocation()), Ty, in EmitGlobalVariable()
3366 llvm::MDType *Ty = E.Type->getDecl()->getDefinition() in finalize() local
3369 DBuilder.replaceTemporary(llvm::TempMDType(E.Decl), Ty); in finalize()
3374 auto *Ty = cast<llvm::MDType>(p.second); in finalize() local
3375 assert(Ty->isForwardDecl()); in finalize()
3381 DBuilder.replaceTemporary(llvm::TempMDType(Ty), in finalize()
3412 void CGDebugInfo::EmitExplicitCastType(QualType Ty) { in EmitExplicitCastType() argument
3416 if (llvm::DIType DieTy = getOrCreateType(Ty, getOrCreateMainFile())) in EmitExplicitCastType()