[ELF] Improve 2 SmallVector<*, N> usage
authorFangrui Song <i@maskray.me>
Sun, 29 Nov 2020 22:01:32 +0000 (14:01 -0800)
committerFangrui Song <i@maskray.me>
Sun, 29 Nov 2020 22:01:32 +0000 (14:01 -0800)
commitdfcf1acf13226be0f599a7ab6b395b66dc9545d6
tree0e42aedca54e5f86acb9f4d322d1710286693e61
parent891170e8636b312092486dee7c9117db7def8836
[ELF] Improve 2 SmallVector<*, N> usage

For --gc-sections, SmallVector<InputSection *, 256> -> SmallVector<InputSection *, 0> because the code bloat (1296 bytes) is not worthwhile (the saved reallocation is negligible).
For OutputSection::compressedData, N=1 is useless (for a compressed .debug_*, the size is always larger than 1).
lld/ELF/MarkLive.cpp
lld/ELF/OutputSections.h