Split InputSectionDescription::Sort into SortInner and SortOuter.
authorRui Ueyama <ruiu@google.com>
Thu, 4 Aug 2016 22:27:00 +0000 (22:27 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 4 Aug 2016 22:27:00 +0000 (22:27 +0000)
commit742c38361bfcf53561c0fca9289abbda03a5f40b
treeef219bea897295d0373d006cf35d20593e695bf3
parent3bade138b5edb59a472996aeb21fdf9b29d98209
Split InputSectionDescription::Sort into SortInner and SortOuter.

Summary:
The comparator function to compare input sections as instructed by
SORT command was a bit too complicated because it needed to handle
four different cases. This patch split it into two function calls.

This patch also simplifies the parser.

Reviewers: grimar

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23140

llvm-svn: 277780
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h