Lines Matching defs:CU

530 template <typename Func> static void forBothCUs(DwarfCompileUnit &CU, Func F) {
531 F(CU);
532 if (auto *SkelCU = CU.getSkeleton())
533 if (CU.getCUNode()->getSplitDebugInlining())
552 // Avoid building the original CU if it won't be used
555 auto &CU = getOrCreateDwarfCompileUnit(SP->getUnit());
556 if (auto *SkelCU = CU.getSkeleton()) {
557 (shareAcrossDWOCUs() ? CU : SrcCU)
559 if (CU.getCUNode()->getSplitDebugInlining())
562 CU.constructAbstractSubprogramScopeDIE(Scope);
875 DwarfCompileUnit &CU, DIE &ScopeDIE,
886 CU.addFlag(ScopeDIE, CU.getDwarf5OrGNUAttr(dwarf::DW_AT_call_all_calls));
970 (!IsTail || CU.useGNUAnalogForDwarf5Feature())
988 DIE &CallSiteDIE = CU.constructCallSiteEntryDIE(
996 CU.constructCallSiteParmEntryDIEs(CallSiteDIE, Params);
1040 // skeleton CU and so we don't need to duplicate it here.
1060 // This CU is either a clang module DWO or a skeleton CU.
1064 // This is a prefabricated skeleton CU.
1076 if (auto *CU = CUMap.lookup(DIUnit))
1077 return *CU;
1197 DwarfCompileUnit &CU = getOrCreateDwarfCompileUnit(CUNode);
1201 // Don't bother adding DIGlobalVariableExpressions listed in the CU if we
1214 CU.getOrCreateGlobalVariableDIE(GV, sortGlobalExprs(GVMap[GV]));
1218 CU.getOrCreateTypeDIE(cast<DIType>(Ty));
1225 CU.getOrCreateTypeDIE(RT);
1248 [&](DwarfCompileUnit &CU) { CU.finishSubprogramDefinition(SP); });
1259 // Include the DWO file name in the hash if there's more than one CU.
1261 // duplicate with the same CU partially imported into another ThinLTO unit.
1278 // Add CU specific attributes if we need to add any.
1280 // CU then add the dwo id to it.
1298 // Emit a unique identifier for this CU.
1340 // We don't keep track of which addresses are used in which CU so this
1412 DwarfCompileUnit *CU = &*P.second;
1417 "Unexpected function-local entity in 'imports' CU field.");
1418 CU->getOrCreateImportedEntityDIE(IE);
1420 for (const auto *D : CU->getDeferredLocalDecls()) {
1422 CU->getOrCreateImportedEntityDIE(IE);
1428 CU->createBaseTypeDIEs();
1502 void DwarfDebug::ensureAbstractEntityIsCreatedIfScoped(DwarfCompileUnit &CU,
1504 if (CU.getExistingAbstractEntity(Node))
1509 CU.createAbstractEntity(Node, Scope);
2225 DwarfCompileUnit &CU = getOrCreateDwarfCompileUnit(SP->getUnit());
2228 getDwarfCompileUnitIDForLineTable(CU));
2236 DwarfDebug::getDwarfCompileUnitIDForLineTable(const DwarfCompileUnit &CU) {
2244 return CU.getUniqueID();
2247 void DwarfDebug::terminateLineTable(const DwarfCompileUnit *CU) {
2248 const auto &CURanges = CU->getRanges();
2250 getDwarfCompileUnitIDForLineTable(*CU));
2251 // Add the last range label for the given CU.
2289 // Add the range of this function to the list of ranges for the CU.
2436 // dwarf pubnames - offset/name pairs where the offset is the offset into the CU
2440 // into the CU and the index value is computed according to the type of value
2447 /// computeIndexValue - Compute the gdb index value for the DIE and CU.
2448 static dwarf::PubIndexEntryDescriptor computeIndexValue(DwarfUnit *CU,
2450 // Entities that ended up only in a Type Unit reference the CU instead (since
2451 // the pub entry has offsets within the CU there's no real offset that can be
2480 dwarf::isCPlusPlus((dwarf::SourceLanguage)CU->getLanguage())
2525 void DwarfDebug::emitSectionReference(const DwarfCompileUnit &CU) {
2527 Asm->emitDwarfOffset(CU.getSection()->getBeginSymbol(),
2528 CU.getDebugSectionOffset());
2530 Asm->emitDwarfSymbolReference(CU.getLabelBegin());
2594 const DwarfCompileUnit *CU) {
2621 Streamer.emitDIERef(*CU->ExprRefedBaseTypes[Op.getRawOperand(I)].Die);
2762 const DwarfCompileUnit *CU) {
2777 emitDebugLocEntry(Streamer, Entry, CU);
2821 const DwarfCompileUnit &CU, unsigned BaseAddressx, unsigned OffsetPair,
2840 const MCSymbol *CUBase = CU.getBaseAddress();
2917 *List.CU, dwarf::DW_LLE_base_addressx,
2922 DD.emitDebugLocEntryLocation(E, List.CU);
2980 emitDebugLocEntryLocation(Entry, List.CU);
2990 // Emit a debug aranges section, containing a CU lookup for any
2991 // address we can tie back to a CU.
3027 assert(Cur.CU);
3028 Spans[Cur.CU].push_back(Span);
3042 // Try and build the longest span we can within the same CU.
3043 if (Cur.CU != Prev.CU) {
3047 assert(Prev.CU);
3048 Spans[Prev.CU].push_back(Span);
3063 DwarfCompileUnit *CU = it.first;
3064 CUs.push_back(CU);
3067 // Sort the CU list (again, to ensure consistent output order).
3072 // Emit an arange table for each CU we used.
3073 for (DwarfCompileUnit *CU : CUs) {
3074 std::vector<ArangeSpan> &List = Spans[CU];
3076 // Describe the skeleton CU's offset and length, not the dwo file's.
3077 if (auto *Skel = CU->getSkeleton())
3078 CU = Skel;
3083 Asm->getDwarfOffsetByteSize() + // Offset of CU in the .debug_info
3102 emitSectionReference(*CU);
3143 emitRangeList(DD, Asm, List.Label, List.Ranges, *List.CU,
3147 List.CU->getCUNode()->getRangesBaseAddress() ||
3194 const DwarfCompileUnit &CU, uint16_t DwarfVersion) {
3214 Asm->emitDwarfSymbolReference(CU.getLineTableStartSym());
3351 DwarfCompileUnit &DwarfDebug::constructSkeletonCU(const DwarfCompileUnit &CU) {
3354 CU.getUniqueID(), CU.getCUNode(), Asm, this, &SkeletonHolder,
3364 initSkeletonUnit(CU, NewCU.getUnitDie(), std::move(OwnedUnit));
3415 MCDwarfDwoLineTable *DwarfDebug::getDwoLineTable(const DwarfCompileUnit &CU) {
3418 const DICompileUnit *DIUnit = CU.getCUNode();
3436 void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
3447 CU.addDIETypeSignature(RefDie, Ins.first->second);
3456 CU, Asm, this, &InfoHolder, NumTypeUnitsCreated++, getDwoLineTable(CU));
3462 CU.getLanguage());
3471 // know from which CU a type unit came from. These two attrbutes help it to
3491 CU.applyStmtList(UnitDie);
3515 // Construct this type in the CU directly.
3519 setCurrentDWARF5AccelTable(DWARF5AccelTableKind::CU);
3520 CU.constructTypeDIE(RefDie, cast<DICompositeType>(CTy));
3540 setCurrentDWARF5AccelTable(DWARF5AccelTableKind::CU);
3542 CU.addDIETypeSignature(RefDie, Signature);
3575 "Kind is CU but TU is being processed.");
3579 "Kind is TU but CU is being processed.");
3664 bool DwarfDebug::alwaysUseRanges(const DwarfCompileUnit &CU) const {