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

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 8 01:50:45 PDT 2018


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


================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:393-394
+    }
+    StringRef Contents((const char *)ContentsWrapped->data(),
+                       ContentsWrapped->size());
+    auto Result =
----------------
jhenderson wrote:
> Don't turn this into a StringRef here. Leave it as an ArrayRef. The compression functions should probably operate on ArrayRefs not StringRefs (including in the existing library) in my opinion, but even if we can't change that decision, we should delay the conversion until necessary.
> 
> Also, don't use C-style casts.
I could change it to an ArrayRef but eventually it would have to be a StringRef since I wrote the Compressor to be similar to the existing Decompressor (which takes a StringRef).


Repository:
  rL LLVM

https://reviews.llvm.org/D49678





More information about the llvm-commits mailing list