[PATCH] D45307: [DWARF v5][NFC] Refactor the implementation of DebugRnglists

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 5 12:40:32 PDT 2018


dblaikie added inline comments.


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h:40
+
+    Error extract(DWARFDataExtractor Data, uint32_t End, uint32_t *OffsetPtr);
+  };
----------------
Maybe this (& DWARFDebugRngList::extract) should be a factory function (either static member or free function) returning ErrorOr<RangeListEntry> (and ErrorOr<DWARFDebugRngList>) - encapsulation doesn't seem to important here - a vector of structs seems like a pretty fine data structure for this purpose/no need to wrap it up in public/private things, etc?


https://reviews.llvm.org/D45307





More information about the llvm-commits mailing list