[PATCH] D22672: [ELF] - Linkerscript: cleanup of LinkerScript<ELFT>::createSections().
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 11:56:22 PDT 2016
davide added a subscriber: davide.
================
Comment at: ELF/LinkerScript.cpp:288
@@ -275,8 +287,3 @@
Result.push_back(Sec);
- if ((!(C->getSectionHdr()->sh_flags & SHF_WRITE)) &&
- Constraint == ReadWrite) {
- Removed.insert(Sec);
- return;
- }
- if ((C->getSectionHdr()->sh_flags & SHF_WRITE) && Constraint == ReadOnly) {
+ if (!canAddSection(C, Constraint)) {
Removed.insert(Sec);
----------------
I'm not entirely convinced about this cleanup, but, whatever.
I think this function should be called `shouldIncludeSection`.
https://reviews.llvm.org/D22672
More information about the llvm-commits
mailing list