summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2017-10-30 10:12:49 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2017-10-30 10:12:49 +0000
commita6b1fbece11f2cece7f3682f9e9e1b7146235f49 (patch)
tree50d7a28004257ccdaee9f7bb561dcacc50a4516c /lld/ELF/OutputSections.cpp
parent9a8c8bf60d16682193bb7edda7f30798ce99d298 (diff)
downloadbcm5719-llvm-a6b1fbece11f2cece7f3682f9e9e1b7146235f49.tar.gz
bcm5719-llvm-a6b1fbece11f2cece7f3682f9e9e1b7146235f49.zip
[ELF] - Stop sorting input sections in createSections().
It does not seem that createSections() is a good place for applying sorting. Patch changes code to do that inside sortSections(), which looks more appropriate place. Differential revision: https://reviews.llvm.org/D39371 llvm-svn: 316893
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 72bb75cbbaf..10eebb4028f 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -296,6 +296,7 @@ bool OutputSection::classof(const BaseCommand *C) {
}
void OutputSection::sort(std::function<int(InputSectionBase *S)> Order) {
+ assert(Live);
assert(SectionCommands.size() == 1);
sortByOrder(cast<InputSectionDescription>(SectionCommands[0])->Sections,
Order);
OpenPOWER on IntegriCloud