[PATCH] D58908: [llvm-objcopy] - SImplify `isCompressable` and fix the issue relative.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 02:06:51 PST 2019
jhenderson added inline comments.
================
Comment at: test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-header.test:10
+
+# In this test we have 2 normal sections, one of them starts from "ZLIB",
+# another starts from "ZZZZ". Check we compress both as expected.
----------------
"from" -> "with" here and the line below.
================
Comment at: tools/llvm-objcopy/ELF/ELFObjcopy.cpp:227-230
+ if ((Section.Flags & ELF::SHF_COMPRESSED) ||
+ StringRef(Section.Name).startswith(".zdebug"))
+ return false;
+ return StringRef(Section.Name).startswith(".debug");
----------------
Now that you've changed this further, this can be even simpler, I think:
```
return !(Section.Flags & ELF::SHF_COMPRESSED) &&
StringRef(Section.Name).startswith(".debug");
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58908/new/
https://reviews.llvm.org/D58908
More information about the llvm-commits
mailing list