Lines Matching refs:CTy
158 void CheckCompositeType(DIDerivedType *ParentTy, DICompositeType *CTy);
178 uint32_t GetFieldInfo(uint32_t InfoKind, DICompositeType *CTy,
232 DICompositeType *CTy) { in CheckCompositeType() argument
233 if (!CTy->getName().empty() || !ParentTy || in CheckCompositeType()
237 if (AnonRecords.find(CTy) == AnonRecords.end()) { in CheckCompositeType()
238 AnonRecords[CTy] = ParentTy; in CheckCompositeType()
245 DIDerivedType *CurrTy = AnonRecords[CTy]; in CheckCompositeType()
248 AnonRecords[CTy] = nullptr; in CheckCompositeType()
271 if (auto *CTy = dyn_cast<DICompositeType>(Ty)) in CheckAnonRecordType() local
272 return CheckCompositeType(ParentTy, CTy); in CheckAnonRecordType()
306 static uint32_t calcArraySize(const DICompositeType *CTy, uint32_t StartDim) { in calcArraySize() argument
307 DINodeArray Elements = CTy->getElements(); in calcArraySize()
517 const auto *CTy = dyn_cast<DICompositeType>(CType); in IsValidAIChain() local
518 assert(PTy && CTy && "ParentType or ChildType is null or not composite"); in IsValidAIChain()
525 uint32_t CTyTag = CTy->getTag(); in IsValidAIChain()
532 return PTy->getBaseType() == CTy->getBaseType(); in IsValidAIChain()
540 return dyn_cast<DICompositeType>(stripQualifiers(Ty)) == CTy; in IsValidAIChain()
681 DICompositeType *CTy, in GetFieldInfo() argument
688 uint32_t Tag = CTy->getTag(); in GetFieldInfo()
691 auto *EltTy = stripQualifiers(CTy->getBaseType()); in GetFieldInfo()
692 PatchImm += AccessIndex * calcArraySize(CTy, 1) * in GetFieldInfo()
695 auto *MemberTy = cast<DIDerivedType>(CTy->getElements()[AccessIndex]); in GetFieldInfo()
710 auto *EltTy = stripQualifiers(CTy->getBaseType()); in GetFieldInfo()
711 return calcArraySize(CTy, 1) * (EltTy->getSizeInBits() >> 3); in GetFieldInfo()
713 auto *MemberTy = cast<DIDerivedType>(CTy->getElements()[AccessIndex]); in GetFieldInfo()
732 if (CTy->getElements().size() != 1) in GetFieldInfo()
734 BaseTy = stripQualifiers(CTy->getBaseType()); in GetFieldInfo()
736 auto *MemberTy = cast<DIDerivedType>(CTy->getElements()[AccessIndex]); in GetFieldInfo()
765 auto *EltTy = stripQualifiers(CTy->getBaseType()); in GetFieldInfo()
766 SizeInBits = calcArraySize(CTy, 1) * EltTy->getSizeInBits(); in GetFieldInfo()
768 MemberTy = cast<DIDerivedType>(CTy->getElements()[AccessIndex]); in GetFieldInfo()
796 auto *EltTy = stripQualifiers(CTy->getBaseType()); in GetFieldInfo()
797 SizeInBits = calcArraySize(CTy, 1) * EltTy->getSizeInBits(); in GetFieldInfo()
799 MemberTy = cast<DIDerivedType>(CTy->getElements()[AccessIndex]); in GetFieldInfo()
894 if (const auto *CTy = dyn_cast<DICompositeType>(Ty)) { in computeBaseAndAccessKey() local
896 assert(CTy->getTag() == dwarf::DW_TAG_array_type); in computeBaseAndAccessKey()
899 FirstIndex += AccessIndex * calcArraySize(CTy, 1); in computeBaseAndAccessKey()
900 BaseTy = stripQualifiers(CTy->getBaseType()); in computeBaseAndAccessKey()
901 CheckElemType = CTy->getElements().size() == 1; in computeBaseAndAccessKey()
908 CTy = dyn_cast<DICompositeType>(BaseTy); in computeBaseAndAccessKey()
909 if (!CTy) { in computeBaseAndAccessKey()
911 } else if (CTy->getTag() != dwarf::DW_TAG_array_type) { in computeBaseAndAccessKey()
915 FirstIndex += AccessIndex * calcArraySize(CTy, 0); in computeBaseAndAccessKey()
920 auto *CTy = dyn_cast<DICompositeType>(BaseTy); in computeBaseAndAccessKey() local
921 if (!CTy) { in computeBaseAndAccessKey()
927 unsigned CTag = CTy->getTag(); in computeBaseAndAccessKey()
929 TypeName = std::string(CTy->getName()); in computeBaseAndAccessKey()
935 TypeMeta = CTy; in computeBaseAndAccessKey()
936 PatchImm += FirstIndex * (CTy->getSizeInBits() >> 3); in computeBaseAndAccessKey()
974 auto *CTy = cast<DICompositeType>(stripQualifiers(cast<DIType>(MDN))); in computeBaseAndAccessKey() local
975 PatchImm = GetFieldInfo(InfoKind, CTy, AccessIndex, PatchImm, in computeBaseAndAccessKey()
1027 const auto *CTy = cast<DICompositeType>(BaseTy); in computeAccessKey() local
1028 assert(CTy->getTag() == dwarf::DW_TAG_enumeration_type); in computeAccessKey()
1030 for (const auto Element : CTy->getElements()) { in computeAccessKey()