[PATCH] D63185: [llvm-objcopy] [WIP] Librarify llvm-objcopy

Alex Brachet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 01:29:56 PDT 2019


abrachet marked an inline comment as done.
abrachet added inline comments.


================
Comment at: llvm/lib/Object/MutableObject.cpp:56-62
+MutableObjectRange<SectionBase> MutableObject::sections() const {
+  return MutableObjectRange(Sections);
+}
+
+MutableObjectRange<SegmentBase> MutableObject::segments() const {
+  return MutableObjectRange<SegmentBase>(Segments);
+}
----------------
I need help here. I just can't get it to compile. I guess I'm not understanding templates correctly? The constructor looks like this `MutableObjectRange<T>::MutableObjectRange(UpdadableList<T>)`. I want the compiler to deduce the template parameter to type `T` when I pass an `UpdadableList<T>`. Either way even if I declare the template parameter like I do on line 61, it still doesn't compile. Any tips?


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

https://reviews.llvm.org/D63185





More information about the llvm-commits mailing list