[PATCH] D49678: [llvm-objcopy] Adding support for compressed DWARF debug sections.

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 6 15:33:56 PDT 2018


plotfi marked 4 inline comments as done.
plotfi added inline comments.


================
Comment at: tools/llvm-objcopy/Object.h:332
+  const StringRef getContents() const override {
+    return StringRef((const char *)Contents.data(), Contents.size());
+  }
----------------
jhenderson wrote:
> Why not just return Contents directly, and make this an ArrayRef<uint8_t> return type?
Decided to return a Expected<ArrayRef<uint8_t>>, if the object does not have any relevant contents then it just returns an error. I think this works out for cases like StringTableSection and SymbolTableSection where im not sure what I would implement for their getSectionContents method. 


Repository:
  rL LLVM

https://reviews.llvm.org/D49678





More information about the llvm-commits mailing list