diff --git a/llvm/include/llvm/DWARFLinker/DWARFLinker.h b/llvm/include/llvm/DWARFLinker/DWARFLinker.h index 8090bfdef10a6..e5475bb50b707 100644 --- a/llvm/include/llvm/DWARFLinker/DWARFLinker.h +++ b/llvm/include/llvm/DWARFLinker/DWARFLinker.h @@ -563,13 +563,6 @@ class DWARFLinker { OffsetsStringPool &DebugLineStrPool, unsigned Indent = 0); - /// Mark the passed DIE as well as all the ones it depends on as kept. - void keepDIEAndDependencies(AddressesMap &RelocMgr, RangesTy &Ranges, - const UnitListTy &Units, const DWARFDie &DIE, - CompileUnit::DIEInfo &MyInfo, - const DWARFFile &File, CompileUnit &CU, - bool UseODR); - unsigned shouldKeepDIE(AddressesMap &RelocMgr, RangesTy &Ranges, const DWARFDie &DIE, const DWARFFile &File, CompileUnit &Unit, CompileUnit::DIEInfo &MyInfo, diff --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp b/llvm/lib/DWARFLinker/DWARFLinker.cpp index 363cff430a662..e1a2d012023e0 100644 --- a/llvm/lib/DWARFLinker/DWARFLinker.cpp +++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp @@ -903,8 +903,6 @@ void DWARFLinker::lookForDIEsToKeep(AddressesMap &AddressesMap, if ((Current.Flags & TF_DependencyWalk) && AlreadyKept) continue; - // We must not call shouldKeepDIE while called from keepDIEAndDependencies, - // because it would screw up the relocation finding logic. if (!(Current.Flags & TF_DependencyWalk)) Current.Flags = shouldKeepDIE(AddressesMap, Ranges, Current.Die, File, Current.CU, MyInfo, Current.Flags);