[PATCH] D59017: [llvm-objcopy] - Remove dead code. NFCI.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 06:11:39 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL355505: [llvm-objcopy] - Remove dead code. NFCI. (authored by grimar, committed by ).
Herald added a project: LLVM.
Changed prior to commit:
https://reviews.llvm.org/D59017?vs=189466&id=189495#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59017/new/
https://reviews.llvm.org/D59017
Files:
llvm/trunk/tools/llvm-objcopy/ELF/Object.cpp
Index: llvm/trunk/tools/llvm-objcopy/ELF/Object.cpp
===================================================================
--- llvm/trunk/tools/llvm-objcopy/ELF/Object.cpp
+++ llvm/trunk/tools/llvm-objcopy/ELF/Object.cpp
@@ -182,13 +182,6 @@
template <class ELFT>
void ELFSectionWriter<ELFT>::visit(const DecompressedSection &Sec) {
- uint8_t *Buf = Out.getBufferStart() + Sec.Offset;
-
- if (!zlib::isAvailable()) {
- std::copy(Sec.OriginalData.begin(), Sec.OriginalData.end(), Buf);
- return;
- }
-
const size_t DataOffset = isDataGnuCompressed(Sec.OriginalData)
? (ZlibGnuMagic.size() + sizeof(Sec.Size))
: sizeof(Elf_Chdr_Impl<ELFT>);
@@ -202,6 +195,7 @@
static_cast<size_t>(Sec.Size)))
reportError(Sec.Name, std::move(E));
+ uint8_t *Buf = Out.getBufferStart() + Sec.Offset;
std::copy(DecompressedContent.begin(), DecompressedContent.end(), Buf);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59017.189495.patch
Type: text/x-patch
Size: 981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190306/9ea30fdd/attachment.bin>
More information about the llvm-commits
mailing list