Lines Matching refs:Ty
424 void DwarfUnit::addSourceLine(DIE &Die, DIType Ty) { in addSourceLine() argument
425 assert(Ty); in addSourceLine()
427 addSourceLine(Die, Ty->getLine(), Ty->getFilename(), Ty->getDirectory()); in addSourceLine()
432 void DwarfUnit::addSourceLine(DIE &Die, DIObjCProperty Ty) { in addSourceLine() argument
433 assert(Ty); in addSourceLine()
435 addSourceLine(Die, Ty->getLine(), Ty->getFilename(), Ty->getDirectory()); in addSourceLine()
522 DIType Ty = DV.getType(); in addBlockByrefAddress() local
523 DIType TmpTy = Ty; in addBlockByrefAddress()
524 uint16_t Tag = Ty->getTag(); in addBlockByrefAddress()
530 DIDerivedType DTy = cast<MDDerivedType>(Ty); in addBlockByrefAddress()
597 static bool isUnsignedDIType(DwarfDebug *DD, DIType Ty) { in isUnsignedDIType() argument
598 if (DIDerivedType DTy = dyn_cast<MDDerivedTypeBase>(Ty)) { in isUnsignedDIType()
599 dwarf::Tag T = (dwarf::Tag)Ty->getTag(); in isUnsignedDIType()
628 DIBasicType BTy = cast<MDBasicType>(Ty); in isUnsignedDIType()
636 (Ty->getTag() == dwarf::DW_TAG_unspecified_type && in isUnsignedDIType()
637 Ty->getName() == "decltype(nullptr)")) && in isUnsignedDIType()
642 Ty->getTag() == dwarf::DW_TAG_unspecified_type; in isUnsignedDIType()
646 static uint64_t getBaseTypeSize(DwarfDebug *DD, DIDerivedType Ty) { in getBaseTypeSize() argument
647 unsigned Tag = Ty->getTag(); in getBaseTypeSize()
652 return Ty->getSizeInBits(); in getBaseTypeSize()
654 auto *BaseType = DD->resolve(Ty->getBaseType()); in getBaseTypeSize()
663 return Ty->getSizeInBits(); in getBaseTypeSize()
701 void DwarfUnit::addConstantValue(DIE &Die, const ConstantInt *CI, DIType Ty) { in addConstantValue() argument
702 addConstantValue(Die, CI->getValue(), Ty); in addConstantValue()
707 DIType Ty) { in addConstantValue() argument
710 addConstantValue(Die, isUnsignedDIType(DD, Ty), MO.getImm()); in addConstantValue()
720 void DwarfUnit::addConstantValue(DIE &Die, const APInt &Val, DIType Ty) { in addConstantValue() argument
721 addConstantValue(Die, Val, isUnsignedDIType(DD, Ty)); in addConstantValue()
788 DIE *DwarfUnit::createTypeDIE(DICompositeType Ty) { in createTypeDIE() argument
789 DIScope Context = resolve(Ty->getScope()); in createTypeDIE()
792 if (DIE *TyDIE = getDIE(Ty)) in createTypeDIE()
796 DIE &TyDIE = createAndAddDIE(Ty->getTag(), *ContextDIE, Ty); in createTypeDIE()
798 constructTypeDIE(TyDIE, Ty); in createTypeDIE()
800 updateAcceleratorTables(Context, Ty, TyDIE); in createTypeDIE()
810 auto *Ty = cast<MDType>(TyNode); in getOrCreateTypeDIE() local
811 assert(Ty == resolve(Ty->getRef()) && in getOrCreateTypeDIE()
815 if (Ty->getTag() == dwarf::DW_TAG_restrict_type && DD->getDwarfVersion() <= 2) in getOrCreateTypeDIE()
817 resolve(DITypeRef(cast<MDDerivedType>(Ty)->getBaseType()))); in getOrCreateTypeDIE()
821 DIScope Context = resolve(Ty->getScope()); in getOrCreateTypeDIE()
825 if (DIE *TyDIE = getDIE(Ty)) in getOrCreateTypeDIE()
829 DIE &TyDIE = createAndAddDIE(Ty->getTag(), *ContextDIE, Ty); in getOrCreateTypeDIE()
831 updateAcceleratorTables(Context, Ty, TyDIE); in getOrCreateTypeDIE()
833 if (auto *BT = dyn_cast<MDBasicType>(Ty)) in getOrCreateTypeDIE()
835 else if (DICompositeType CTy = dyn_cast<MDCompositeTypeBase>(Ty)) { in getOrCreateTypeDIE()
836 if (GenerateDwarfTypeUnits && !Ty->isForwardDecl()) in getOrCreateTypeDIE()
844 constructTypeDIE(TyDIE, cast<MDDerivedType>(Ty)); in getOrCreateTypeDIE()
850 void DwarfUnit::updateAcceleratorTables(DIScope Context, DIType Ty, in updateAcceleratorTables() argument
852 if (!Ty->getName().empty() && !Ty->isForwardDecl()) { in updateAcceleratorTables()
854 if (auto *CT = dyn_cast<MDCompositeTypeBase>(Ty)) { in updateAcceleratorTables()
860 DD->addAccelType(Ty->getName(), TyDIE, Flags); in updateAcceleratorTables()
864 addGlobalType(Ty, TyDIE, Context); in updateAcceleratorTables()
869 void DwarfUnit::addType(DIE &Entity, DIType Ty, dwarf::Attribute Attribute) { in addType() argument
870 assert(Ty && "Trying to add a type that doesn't exist?"); in addType()
873 DIEEntry *Entry = getDIEEntry(Ty); in addType()
881 DIE *Buffer = getOrCreateTypeDIE(Ty); in addType()
885 insertDIEEntry(Ty, Entry); in addType()
983 DIType Ty = resolve(Args[i]); in constructSubprogramArguments() local
984 if (!Ty) { in constructSubprogramArguments()
989 addType(Arg, Ty); in constructSubprogramArguments()
990 if (Ty->isArtificial()) in constructSubprogramArguments()
1304 if (auto Ty = resolve(Args[0])) in applySubprogramAttributes() local
1305 addType(SPDie, Ty); in applySubprogramAttributes()
1564 DIType Ty = resolve(DT->getBaseType()); in getOrCreateStaticMemberDIE() local
1567 addType(StaticMemberDIE, Ty); in getOrCreateStaticMemberDIE()
1585 addConstantValue(StaticMemberDIE, CI, Ty); in getOrCreateStaticMemberDIE()
1625 Asm->OutStreamer.EmitIntValue(Ty ? Ty->getOffset() : 0, in emitHeader()
1626 sizeof(Ty->getOffset())); in emitHeader()