summaryrefslogtreecommitdiffstats
path: root/lld/ELF/ICF.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-12-05 01:31:39 +0000
committerRui Ueyama <ruiu@google.com>2016-12-05 01:31:39 +0000
commit5cb712ed3c63fb77d39247aaad914c37af2a53f2 (patch)
tree7ba60c6c2f02d641ce7632c7a528d77e7e6dcff3 /lld/ELF/ICF.cpp
parentabf7ebec3df394a32a198e4993a9ee3ebcc4166f (diff)
downloadbcm5719-llvm-5cb712ed3c63fb77d39247aaad914c37af2a53f2.tar.gz
bcm5719-llvm-5cb712ed3c63fb77d39247aaad914c37af2a53f2.zip
Simplify ICF alignment handling.
llvm-svn: 288630
Diffstat (limited to 'lld/ELF/ICF.cpp')
-rw-r--r--lld/ELF/ICF.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp
index fbb0e018ec1..002465ed8a8 100644
--- a/lld/ELF/ICF.cpp
+++ b/lld/ELF/ICF.cpp
@@ -339,11 +339,7 @@ template <class ELFT> void ICF<ELFT>::run() {
// the same color are consecutive in the vector.
std::stable_sort(Sections.begin(), Sections.end(),
[](InputSection<ELFT> *A, InputSection<ELFT> *B) {
- if (A->Color[0] != B->Color[0])
- return A->Color[0] < B->Color[0];
- // Within a group, put the highest alignment
- // requirement first, so that's the one we'll keep.
- return B->Alignment < A->Alignment;
+ return A->Color[0] < B->Color[0];
});
// Compare static contents and assign unique IDs for each static content.
OpenPOWER on IntegriCloud