[PATCH] D31941: [ELF] - Implemented --compress-debug-sections option.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 02:11:09 PDT 2017


grimar added a comment.

Thanks for review, Rui !



================
Comment at: ELF/OutputSections.cpp:99-109
+  if (Config->Is64) {
+    Buf += sizeof(Elf64_Word); // Skip ch_reserved field.
+    write64<E>(Buf, Size);
+    Buf += sizeof(Elf64_Xword);
+    write64<E>(Buf, Alignment);
+    Buf += sizeof(Elf64_Xword);
+  } else {
----------------
ruiu wrote:
> You are not accessing these members by name.
Ah. I misread your comment at first, sorry. Fixed in commit.


================
Comment at: ELF/OutputSections.cpp:128
+  this->writeTo<ELFT>(&Data[0]);
+  zlib::compress(StringRef((char *)Data.data(), Data.size()), CompressedData);
+
----------------
ruiu wrote:
> I believe this function returns an Error. Make sure you handle an error before submitting.
Done.


Repository:
  rL LLVM

https://reviews.llvm.org/D31941





More information about the llvm-commits mailing list