From d8b27769c837a7775f2e3419516828692221392c Mon Sep 17 00:00:00 2001 From: George Rimar Date: Mon, 14 Nov 2016 10:14:18 +0000 Subject: [PATCH] [ELF] - format. NFC. llvm-svn: 286805 --- lld/ELF/DriverUtils.cpp | 6 ++---- lld/ELF/InputSection.cpp | 6 ++---- lld/ELF/InputSection.h | 1 - lld/ELF/OutputSections.cpp | 3 +-- lld/ELF/SyntheticSections.cpp | 3 +-- lld/ELF/Writer.cpp | 4 +--- 6 files changed, 7 insertions(+), 16 deletions(-) diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp index 952acc5..e2ee469 100644 --- a/lld/ELF/DriverUtils.cpp +++ b/lld/ELF/DriverUtils.cpp @@ -41,10 +41,8 @@ using namespace lld::elf; // Create table mapping all options defined in Options.td static const opt::OptTable::Info OptInfo[] = { #define OPTION(X1, X2, ID, KIND, GROUP, ALIAS, X6, X7, X8, X9, X10) \ - { \ - X1, X2, X9, X10, OPT_##ID, opt::Option::KIND##Class, X8, X7, OPT_##GROUP, \ - OPT_##ALIAS, X6 \ - }, + {X1, X2, X9, X10, OPT_##ID, opt::Option::KIND##Class, \ + X8, X7, OPT_##GROUP, OPT_##ALIAS, X6}, #include "Options.inc" #undef OPTION }; diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 78449db..1cfb1f9 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -259,8 +259,7 @@ static uint64_t getAArch64Page(uint64_t Expr) { return Expr & (~static_cast(0xFFF)); } -static uint32_t getARMUndefinedRelativeWeakVA(uint32_t Type, - uint32_t A, +static uint32_t getARMUndefinedRelativeWeakVA(uint32_t Type, uint32_t A, uint32_t P) { switch (Type) { case R_ARM_THM_JUMP11: @@ -281,8 +280,7 @@ static uint32_t getARMUndefinedRelativeWeakVA(uint32_t Type, } } -static uint64_t getAArch64UndefinedRelativeWeakVA(uint64_t Type, - uint64_t A, +static uint64_t getAArch64UndefinedRelativeWeakVA(uint64_t Type, uint64_t A, uint64_t P) { switch (Type) { case R_AARCH64_CALL26: diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index 0d16bd5..8c7ec02 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -232,7 +232,6 @@ public: // Splittable sections are handled as a sequence of data // rather than a single large blob of data. std::vector Pieces; - }; // This corresponds to a non SHF_MERGE section of an input file. diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 047ebc0..20bd23c 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -639,8 +639,7 @@ template void OutputSection::finalize() { if (!Config->Relocatable) { // SHF_LINK_ORDER only has meaning in relocatable objects this->Flags &= ~SHF_LINK_ORDER; - } - else if (!this->Sections.empty()) { + } else if (!this->Sections.empty()) { // When doing a relocatable link we must preserve the link order // dependency of sections with the SHF_LINK_ORDER flag. The dependency // is indicated by the sh_link field. We need to translate the diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 38a8941..d432758 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -616,8 +616,7 @@ template void GotSection::writeTo(uint8_t *Buf) { template GotPltSection::GotPltSection() : SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS, - Target->GotPltEntrySize, ".got.plt") { -} + Target->GotPltEntrySize, ".got.plt") {} template void GotPltSection::addEntry(SymbolBody &Sym) { Sym.GotPltIndex = Target->GotPltHeaderEntriesNum + Entries.size(); diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 5e70b91..9776f62 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -129,9 +129,7 @@ template static bool needsInterpSection() { !Script::X->ignoreInterpSection(); } -template void elf::writeResult() { - Writer().run(); -} +template void elf::writeResult() { Writer().run(); } // The main function of the writer. template void Writer::run() { -- 2.7.4