Lines Matching defs:CU

531 template <typename Func> static void forBothCUs(DwarfCompileUnit &CU, Func F) {
532 F(CU);
533 if (auto *SkelCU = CU.getSkeleton())
534 if (CU.getCUNode()->getSplitDebugInlining())
553 // Avoid building the original CU if it won't be used
556 auto &CU = getOrCreateDwarfCompileUnit(SP->getUnit());
557 if (auto *SkelCU = CU.getSkeleton()) {
558 (shareAcrossDWOCUs() ? CU : SrcCU)
560 if (CU.getCUNode()->getSplitDebugInlining())
563 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;
1198 DwarfCompileUnit &CU = getOrCreateDwarfCompileUnit(CUNode);
1202 // Don't bother adding DIGlobalVariableExpressions listed in the CU if we
1215 CU.getOrCreateGlobalVariableDIE(GV, sortGlobalExprs(GVMap[GV]));
1219 CU.getOrCreateTypeDIE(cast<DIType>(Ty));
1226 CU.getOrCreateTypeDIE(RT);
1249 [&](DwarfCompileUnit &CU) { CU.finishSubprogramDefinition(SP); });
1272 // Add CU specific attributes if we need to add any.
1274 // CU then add the dwo id to it.
1291 // Emit a unique identifier for this CU. Include the DWO file name in the
1294 // all (unused) code from a CU.
1343 // We don't keep track of which addresses are used in which CU so this
1415 DwarfCompileUnit *CU = &*P.second;
1420 "Unexpected function-local entity in 'imports' CU field.");
1421 CU->getOrCreateImportedEntityDIE(IE);
1423 for (const auto *D : CU->getDeferredLocalDecls()) {
1425 CU->getOrCreateImportedEntityDIE(IE);
1431 CU->createBaseTypeDIEs();
1505 void DwarfDebug::ensureAbstractEntityIsCreatedIfScoped(DwarfCompileUnit &CU,
1507 if (CU.getExistingAbstractEntity(Node))
1512 CU.createAbstractEntity(Node, Scope);
2477 DwarfCompileUnit &CU = getOrCreateDwarfCompileUnit(SP->getUnit());
2478 FunctionLineTableLabel = CU.emitFuncLineTableOffsets()
2483 getDwarfCompileUnitIDForLineTable(CU));
2493 DwarfDebug::getDwarfCompileUnitIDForLineTable(const DwarfCompileUnit &CU) {
2501 return CU.getUniqueID();
2504 void DwarfDebug::terminateLineTable(const DwarfCompileUnit *CU) {
2505 const auto &CURanges = CU->getRanges();
2507 getDwarfCompileUnitIDForLineTable(*CU));
2508 // Add the last range label for the given CU.
2546 // Add the range of this function to the list of ranges for the CU.
2696 // dwarf pubnames - offset/name pairs where the offset is the offset into the CU
2700 // into the CU and the index value is computed according to the type of value
2707 /// computeIndexValue - Compute the gdb index value for the DIE and CU.
2708 static dwarf::PubIndexEntryDescriptor computeIndexValue(DwarfUnit *CU,
2710 // Entities that ended up only in a Type Unit reference the CU instead (since
2711 // the pub entry has offsets within the CU there's no real offset that can be
2740 dwarf::isCPlusPlus((dwarf::SourceLanguage)CU->getLanguage())
2785 void DwarfDebug::emitSectionReference(const DwarfCompileUnit &CU) {
2787 Asm->emitDwarfOffset(CU.getSection()->getBeginSymbol(),
2788 CU.getDebugSectionOffset());
2790 Asm->emitDwarfSymbolReference(CU.getLabelBegin());
2854 const DwarfCompileUnit *CU) {
2881 Streamer.emitDIERef(*CU->ExprRefedBaseTypes[Op.getRawOperand(I)].Die);
3022 const DwarfCompileUnit *CU) {
3037 emitDebugLocEntry(Streamer, Entry, CU);
3081 const DwarfCompileUnit &CU, unsigned BaseAddressx, unsigned OffsetPair,
3101 const MCSymbol *CUBase = CU.getBaseAddress();
3188 *List.CU, dwarf::DW_LLE_base_addressx,
3193 DD.emitDebugLocEntryLocation(E, List.CU);
3251 emitDebugLocEntryLocation(Entry, List.CU);
3261 // Emit a debug aranges section, containing a CU lookup for any
3262 // address we can tie back to a CU.
3298 assert(Cur.CU);
3299 Spans[Cur.CU].push_back(Span);
3313 // Try and build the longest span we can within the same CU.
3314 if (Cur.CU != Prev.CU) {
3318 assert(Prev.CU);
3319 Spans[Prev.CU].push_back(Span);
3334 DwarfCompileUnit *CU = it.first;
3335 CUs.push_back(CU);
3338 // Sort the CU list (again, to ensure consistent output order).
3343 // Emit an arange table for each CU we used.
3344 for (DwarfCompileUnit *CU : CUs) {
3345 std::vector<ArangeSpan> &List = Spans[CU];
3347 // Describe the skeleton CU's offset and length, not the dwo file's.
3348 if (auto *Skel = CU->getSkeleton())
3349 CU = Skel;
3354 Asm->getDwarfOffsetByteSize() + // Offset of CU in the .debug_info
3373 emitSectionReference(*CU);
3414 emitRangeList(DD, Asm, List.Label, List.Ranges, *List.CU,
3418 List.CU->getCUNode()->getRangesBaseAddress() ||
3465 const DwarfCompileUnit &CU, uint16_t DwarfVersion) {
3485 Asm->emitDwarfSymbolReference(CU.getLineTableStartSym());
3622 DwarfCompileUnit &DwarfDebug::constructSkeletonCU(const DwarfCompileUnit &CU) {
3625 CU.getUniqueID(), CU.getCUNode(), Asm, this, &SkeletonHolder,
3635 initSkeletonUnit(CU, NewCU.getUnitDie(), std::move(OwnedUnit));
3686 MCDwarfDwoLineTable *DwarfDebug::getDwoLineTable(const DwarfCompileUnit &CU) {
3689 const DICompileUnit *DIUnit = CU.getCUNode();
3707 void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
3718 CU.addDIETypeSignature(RefDie, Ins.first->second);
3727 CU, Asm, this, &InfoHolder, NumTypeUnitsCreated++, getDwoLineTable(CU));
3733 CU.getLanguage());
3742 // know from which CU a type unit came from. These two attrbutes help it to
3762 CU.applyStmtList(UnitDie);
3786 // Construct this type in the CU directly.
3790 setCurrentDWARF5AccelTable(DWARF5AccelTableKind::CU);
3791 CU.constructTypeDIE(RefDie, cast<DICompositeType>(CTy));
3792 CU.updateAcceleratorTables(CTy->getScope(), CTy, RefDie);
3812 setCurrentDWARF5AccelTable(DWARF5AccelTableKind::CU);
3814 CU.addDIETypeSignature(RefDie, Signature);
3847 "Kind is CU but TU is being processed.");
3851 "Kind is TU but CU is being processed.");
3936 bool DwarfDebug::alwaysUseRanges(const DwarfCompileUnit &CU) const {