[PATCH] D38282: llvm-dwarfdump: implement --find=<name>

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 11:27:40 PDT 2017


dblaikie added inline comments.


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h:69
+    /// End marker.
+    ValueIterator() : NumData(0) {}
+
----------------
= default?


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h:71
+
+    const ArrayRef<DWARFFormValue> operator*() const {
+      return AtomForms;
----------------
Should this be const /ref/ return? (or non-const value, though iterators that return by value are problematic)

& what about operator->?

Should this class use one of the iterator facade helpers from llvm/ADT/iterator.h?


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h:76
+    ValueIterator operator++(int) {
+      ValueIterator I(*this);
+      Next();
----------------
Prefer direct init over copy init:

  X y = z;

rather than:

  X y(z);

where possible.


Repository:
  rL LLVM

https://reviews.llvm.org/D38282





More information about the llvm-commits mailing list