[llvm] d9c9d13 - [DWARF] Remove collectChildrenAddressRanges (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 8 08:57:47 PDT 2021


Author: Kazu Hirata
Date: 2021-08-08T08:57:32-07:00
New Revision: d9c9d13365fa323641ca4525949338038d29fd16

URL: https://github.com/llvm/llvm-project/commit/d9c9d13365fa323641ca4525949338038d29fd16
DIFF: https://github.com/llvm/llvm-project/commit/d9c9d13365fa323641ca4525949338038d29fd16.diff

LOG: [DWARF] Remove collectChildrenAddressRanges (NFC)

The last use was removed on Dec 21, 2018 in commit
c3f30a7fc6a166910d4b674301e9108f537daf3c.

Added: 
    

Modified: 
    llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h
    llvm/lib/DebugInfo/DWARF/DWARFDie.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h
index 1903bab5e73f..5a3a951623d5 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h
@@ -220,16 +220,6 @@ class DWARFDie {
   /// information is available.
   Expected<DWARFAddressRangesVector> getAddressRanges() const;
 
-  /// Get all address ranges for any DW_TAG_subprogram DIEs in this DIE or any
-  /// of its children.
-  ///
-  /// Get the hi/low PC range if both attributes are available or exrtracts the
-  /// non-contiguous address ranges from the DW_AT_ranges attribute for this DIE
-  /// and all children.
-  ///
-  /// \param Ranges the addres range vector to fill in.
-  void collectChildrenAddressRanges(DWARFAddressRangesVector &Ranges) const;
-
   bool addressRangeContainsAddress(const uint64_t Address) const;
 
   Expected<DWARFLocationExpressionsVector>

diff  --git a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
index 0501e3ee3f9b..2d5cd864f718 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -483,21 +483,6 @@ Expected<DWARFAddressRangesVector> DWARFDie::getAddressRanges() const {
   return DWARFAddressRangesVector();
 }
 
-void DWARFDie::collectChildrenAddressRanges(
-    DWARFAddressRangesVector &Ranges) const {
-  if (isNULL())
-    return;
-  if (isSubprogramDIE()) {
-    if (auto DIERangesOrError = getAddressRanges())
-      llvm::append_range(Ranges, DIERangesOrError.get());
-    else
-      llvm::consumeError(DIERangesOrError.takeError());
-  }
-
-  for (auto Child : children())
-    Child.collectChildrenAddressRanges(Ranges);
-}
-
 bool DWARFDie::addressRangeContainsAddress(const uint64_t Address) const {
   auto RangesOrError = getAddressRanges();
   if (!RangesOrError) {


        


More information about the llvm-commits mailing list