[PATCH] D43067: Implement equal_range for the DWARF v5 accelerator table

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 03:15:28 PST 2018


labath added inline comments.


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h:290-295
+    Entry(const Entry &RHS) : NameIdx(RHS.NameIdx), Abbr(RHS.Abbr) {
+      Values = RHS.Values;
+    }
+    Entry(Entry &&RHS) : NameIdx(RHS.NameIdx), Abbr(RHS.Abbr) {
+      Values = std::move(RHS.Values);
+    }
----------------
dblaikie wrote:
> Could these be defaulted (maybe even implicitly defaulted)?
These ones are a bit tricky. They could be made default, but then I'd have to un-delete the super class implementations (which I deleted as a standard precaution for polymorphic classes). Maybe I could make the super class functions protected to make sure they're not invoked accidentally ?

(The reason I need these constructors in the first place is so I can return the object as a value from the parsing function without resorting to unique_ptrs and such. I did feel it a bit weird while doing it as this isn't standard practice for polymorphic classes, but it seemed like a nice optimization.)


Repository:
  rL LLVM

https://reviews.llvm.org/D43067





More information about the llvm-commits mailing list