diff options
author | Fangrui Song <maskray@google.com> | 2018-03-20 18:07:25 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-03-20 18:07:25 +0000 |
commit | 0e30731a6a12bf3f512b59da542ac27ede93d56c (patch) | |
tree | f49b562e2b7fc7ce6803110fe8aa1933ee901fcf /lld/ELF/OutputSections.cpp | |
parent | 29149d5cb7a6fe510397788b7705d3b84892a687 (diff) | |
download | bcm5719-llvm-0e30731a6a12bf3f512b59da542ac27ede93d56c.tar.gz bcm5719-llvm-0e30731a6a12bf3f512b59da542ac27ede93d56c.zip |
[ELF] Simplify compCtors and writeInt.
Reviewers: ruiu
Subscribers: emaste, arichardson, llvm-commits
Differential Revision: https://reviews.llvm.org/D44690
llvm-svn: 328009
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r-- | lld/ELF/OutputSections.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 1d03c56ebaf..8e9e75724e5 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -25,7 +25,6 @@ using namespace llvm; using namespace llvm::dwarf; using namespace llvm::object; -using namespace llvm::support::endian; using namespace llvm::ELF; using namespace lld; @@ -213,11 +212,11 @@ static void writeInt(uint8_t *Buf, uint64_t Data, uint64_t Size) { if (Size == 1) *Buf = Data; else if (Size == 2) - write16(Buf, Data, Config->Endianness); + write16(Buf, Data); else if (Size == 4) - write32(Buf, Data, Config->Endianness); + write32(Buf, Data); else if (Size == 8) - write64(Buf, Data, Config->Endianness); + write64(Buf, Data); else llvm_unreachable("unsupported Size argument"); } @@ -366,8 +365,6 @@ static bool compCtors(const InputSection *A, const InputSection *B) { assert(Y.startswith(".ctors") || Y.startswith(".dtors")); X = X.substr(6); Y = Y.substr(6); - if (X.empty() && Y.empty()) - return false; return X < Y; } |