[PATCH] D38491: [ELF] Decompress debug info sections early
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 15:40:40 PDT 2017
ruiu added a comment.
I'd make two changes:
1. `Decompressor::isCompressedELFSection(Sec->Flags, Sec->Name)` is always called before calling `uncompress()`. It is better to move that check inside `uncompress` and rename it `maybeUncompress`.
2. With this change, it's not clear whether it is guaranteed that `uncompress` is called at most once. I'd make a change to `uncompress` so that it doesn't do anything on a second call. You can just check if `UncompressBuf` is empty.
https://reviews.llvm.org/D38491
More information about the llvm-commits
mailing list