Lines Matching defs:CU

64   auto CU = llvm::upper_bound(
68 return CU != Units.end() ? CU->get() : nullptr;
185 static void resolveRelativeObjectPath(SmallVectorImpl<char> &Buf, DWARFDie CU) {
186 sys::path::append(Buf, dwarf::toString(CU.find(dwarf::DW_AT_comp_dir), ""));
192 const DWARFDie &DIE, CompileUnit &CU,
195 if (CU.getLanguage() != dwarf::DW_LANG_Swift)
207 SysRoot = CU.getSysRoot();
223 DWARFDie CUDie = CU.getOrigUnit().getUnitDIE();
268 static bool updatePruning(const DWARFDie &Die, CompileUnit &CU,
270 CompileUnit::DIEInfo &Info = CU.getInfo(Die);
290 static void updateChildPruning(const DWARFDie &Die, CompileUnit &CU,
292 CompileUnit::DIEInfo &Info = CU.getInfo(Die);
305 const DWARFDie &DIE, unsigned ParentIdx, CompileUnit &CU,
320 updatePruning(Current.Die, CU, ModulesEndOffset);
323 updateChildPruning(Current.Die, CU, *Current.OtherInfo);
329 unsigned Idx = CU.getOrigUnit().getDIEIndex(Current.Die);
330 CompileUnit::DIEInfo &Info = CU.getInfo(Idx);
347 CU.getClangModuleName()) {
349 analyzeImportedModule(Current.Die, CU, ParseableSwiftInterfaces,
354 Info.InModuleScope = CU.isClangModule() || Current.InImportedModule;
355 if (CU.hasODR() || Info.InModuleScope) {
358 *Current.Context, Current.Die, CU, Info.InModuleScope);
373 CompileUnit::DIEInfo &ChildInfo = CU.getInfo(Child);
588 // that don't fall into the CU's aranges. This is wrong IMO. Debug info
590 // a label marking the end of a function will have a PC == CU's high_pc.
648 static void updateChildIncompleteness(const DWARFDie &Die, CompileUnit &CU,
659 CompileUnit::DIEInfo &MyInfo = CU.getInfo(Die);
668 static void updateRefIncompleteness(const DWARFDie &Die, CompileUnit &CU,
681 CompileUnit::DIEInfo &MyInfo = CU.getInfo(Die);
693 const DWARFDie &Die, CompileUnit &CU, unsigned Flags,
713 CompileUnit::DIEInfo &ChildInfo = CU.getInfo(Child);
714 Worklist.emplace_back(Die, CU, WorklistItemType::UpdateChildIncompleteness,
716 Worklist.emplace_back(Child, CU, Flags);
720 static bool isODRCanonicalCandidate(const DWARFDie &Die, CompileUnit &CU) {
721 CompileUnit::DIEInfo &Info = CU.getInfo(Die);
726 if (!CU.hasODR() && !Info.InModuleScope)
729 return !Info.Incomplete && Info.Ctxt != CU.getInfo(Info.ParentIdx).Ctxt;
732 void DWARFLinker::markODRCanonicalDie(const DWARFDie &Die, CompileUnit &CU) {
733 CompileUnit::DIEInfo &Info = CU.getInfo(Die);
736 if (Info.Keep && isODRCanonicalCandidate(Die, CU) &&
744 const DWARFDie &Die, CompileUnit &CU, unsigned Flags,
749 : CU.hasODR();
750 DWARFUnit &Unit = CU.getOrigUnit();
771 // emitted, then do not keep the one in this CU. We'll link to
776 // ReferencedCU->hasODR() && CU.hasODR().
801 Worklist.emplace_back(Die, CU, WorklistItemType::UpdateRefIncompleteness,
811 unsigned AncestorIdx, CompileUnit &CU, unsigned Flags,
814 if (CU.getInfo(AncestorIdx).Keep)
817 DWARFUnit &Unit = CU.getOrigUnit();
819 Worklist.emplace_back(CU.getInfo(AncestorIdx).ParentIdx, CU, Flags);
820 Worklist.emplace_back(ParentDIE, CU, Flags);
824 /// information in \p CU's DIEInfo.
862 updateChildIncompleteness(Current.Die, Current.CU, *Current.OtherInfo);
865 updateRefIncompleteness(Current.Die, Current.CU, *Current.OtherInfo);
868 lookForChildDIEsToKeep(Current.Die, Current.CU, Current.Flags, Worklist);
871 lookForRefDIEsToKeep(Current.Die, Current.CU, Current.Flags, Units, File,
875 lookForParentDIEsToKeep(Current.AncestorIdx, Current.CU, Current.Flags,
879 markODRCanonicalDie(Current.Die, Current.CU);
885 unsigned Idx = Current.CU.getOrigUnit().getDIEIndex(Current.Die);
886 CompileUnit::DIEInfo &MyInfo = Current.CU.getInfo(Idx);
904 Current.Flags = shouldKeepDIE(AddressesMap, Current.Die, File, Current.CU,
912 if (Current.CU.hasODR() || MyInfo.InModuleScope)
913 Worklist.emplace_back(Current.Die, Current.CU,
920 Worklist.emplace_back(Current.Die, Current.CU, Current.Flags,
939 Worklist.emplace_back(Current.Die, Current.CU, Current.Flags,
943 : Current.CU.hasODR();
948 Worklist.emplace_back(MyInfo.ParentIdx, Current.CU, ParFlags);
963 static void verifyKeepChain(CompileUnit &CU) {
965 Worklist.push_back(CU.getOrigUnit().getUnitDIE());
974 const bool CurrentDieIsKept = CU.getInfo(Current).Keep;
979 const bool ChildDieIsKept = CU.getInfo(Child).Keep;
993 CU.getInfo(Link.Parent).dump();
997 CU.getInfo(Link.Child).dump();
1416 // a redundant DW_AT_GNU_dwo_id on the non-skeleton CU.
2392 CompileUnit *CU = &U;
2409 CU = RefCU;
2419 if (CU->getInfo(Idx).ParentIdx == 0 ||
2421 CU->getOrigUnit().getDIEAtIndex(CU->getInfo(Idx).ParentIdx).getTag() ==
2425 DWARFDie Die = OrigUnit->getDIEAtIndex(CU->getInfo(Idx).ParentIdx);
2429 hashFullyQualifiedName(Die, *CU, File, ++ChildRecurseDepth)));
2482 reportWarning("Anonymous module skeleton CU for " + PCMFile,
2566 for (const auto &CU : ErrOrObj->Dwarf->compile_units()) {
2567 OnCUDieLoaded(*CU);
2569 auto ChildCUDie = CU->getUnitDIE();
2597 Unit = std::make_unique<CompileUnit>(*CU, UniqueUnitID++, !Options.NoODR,
2714 for (const std::unique_ptr<DWARFUnit> &CU :
2716 DWARFDie CUDie = CU->getUnitDIE();
2721 OnCUDieLoaded(*CU);
2790 for (const auto &CU : OptContext.File.Dwarf->compile_units()) {
2791 auto CUDie = CU->getUnitDIE(/*ExtractUnitDIEOnly=*/true);
2801 for (auto &CU : OptContext.ModuleUnits) {
2802 if (Error Err = cloneModuleUnit(OptContext, CU, ODRContexts, DebugStrPool,
2804 reportWarning(toString(std::move(Err)), CU.File);
2831 for (const auto &CU : Context.File.Dwarf->compile_units()) {
2834 auto CUDie = CU->getUnitDIE(/*ExtractUnitDIEOnly=*/false);
2840 *CU, UniqueUnitID++, !Options.NoODR && !Options.Update, ""));
2873 // cross-cu references require the ParentIdx to be setup for every CU in