[Lldb-commits] [PATCH] D106743: [lldb][NFC] Define DWARFDIE::children out-of-line instead of using template magic

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 11 10:20:07 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb2c262cfb12f: [lldb][NFC] Define DWARFDIE::children out-of-line instead of using template… (authored by teemperor).
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106743/new/

https://reviews.llvm.org/D106743

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h


Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
@@ -90,14 +90,9 @@
                             int &decl_line, int &decl_column, int &call_file,
                             int &call_line, int &call_column,
                             lldb_private::DWARFExpression *frame_base) const;
+
   /// The range of all the children of this DIE.
-  ///
-  /// This is a template just because child_iterator is not completely defined
-  /// at this point.
-  template <typename T = child_iterator>
-  llvm::iterator_range<T> children() const {
-    return llvm::make_range(T(*this), T());
-  }
+  llvm::iterator_range<child_iterator> children() const;
 };
 
 class DWARFDIE::child_iterator
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
@@ -448,3 +448,7 @@
   } else
     return false;
 }
+
+llvm::iterator_range<DWARFDIE::child_iterator> DWARFDIE::children() const {
+  return llvm::make_range(child_iterator(*this), child_iterator());
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106743.365789.patch
Type: text/x-patch
Size: 1298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210811/4b02d27d/attachment.bin>


More information about the lldb-commits mailing list