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