[ELF] Speed up/simplify removeUnusedSyntheticSections. NFC
authorFangrui Song <i@maskray.me>
Mon, 29 Nov 2021 05:07:33 +0000 (21:07 -0800)
committerFangrui Song <i@maskray.me>
Mon, 29 Nov 2021 05:07:34 +0000 (21:07 -0800)
commit99a2d940dd77a9c3699c71024b38baee98df8292
tree96e30a70db16d08b0bf150b82ca84c554f234d10
parent4aac00a71db31121d70b140d7367e7f9d9992f66
[ELF] Speed up/simplify removeUnusedSyntheticSections. NFC

Make one change: when the OutputSection is nullptr (due to /DISCARD/ or garbage
collected BssSection (replaceCommonSymbols)), discard the SyntheticSection as well.
lld/ELF/Writer.cpp