[PATCH] D71157: [ELF] Refine section group --gc-sections rules to not discard .debug_types
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 09:03:35 PST 2019
MaskRay marked 2 inline comments as done.
MaskRay added inline comments.
================
Comment at: lld/ELF/InputFiles.cpp:511
+ if (s->flags & SHF_ALLOC)
+ hasAlloc = true;
+ }
----------------
grimar wrote:
> I'd probably simplify:
>
> ```
> if (InputSectionBase *s = sections[index])
> if (s != &InputSection::discarded && s->flags & SHF_ALLOC)
> hasAlloc = true;
> ```
> Up to you.
Good idea. Applying.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71157/new/
https://reviews.llvm.org/D71157
More information about the llvm-commits
mailing list