diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:42 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:42 +0000 | 
| commit | 84c4061b34e048f47e5eb4fbabc1558495e8157c (patch) | |
| tree | 83f9a0fbaadd2f5e3adac8f066cc8160781b385d /ELF/InputSection.cpp | |
| parent | 20d35e67e67f106f617c939725101223211659f0 (diff) | |
Notes
Diffstat (limited to 'ELF/InputSection.cpp')
| -rw-r--r-- | ELF/InputSection.cpp | 19 | 
1 files changed, 8 insertions, 11 deletions
| diff --git a/ELF/InputSection.cpp b/ELF/InputSection.cpp index d6e9a19051e0f..54fb57cf9888a 100644 --- a/ELF/InputSection.cpp +++ b/ELF/InputSection.cpp @@ -221,8 +221,8 @@ template <class ELFT>  Defined *InputSectionBase::getEnclosingFunction(uint64_t Offset) {    for (Symbol *B : File->getSymbols())      if (Defined *D = dyn_cast<Defined>(B)) -      if (D->Section == this && D->Type == STT_FUNC && -          D->Value <= Offset && Offset < D->Value + D->Size) +      if (D->Section == this && D->Type == STT_FUNC && D->Value <= Offset && +          Offset < D->Value + D->Size)          return D;    return nullptr;  } @@ -671,7 +671,7 @@ static uint64_t getRelocTargetVA(const InputFile *File, RelType Type, int64_t A,    case R_TLSLD_GOT_FROM_END:      return InX::Got->getTlsIndexOff() + A - InX::Got->getSize();    case R_TLSLD_GOT: -      return InX::Got->getTlsIndexOff() + A; +    return InX::Got->getTlsIndexOff() + A;    case R_TLSLD_PC:      return InX::Got->getTlsIndexVA() + A - P;    } @@ -842,8 +842,7 @@ void InputSectionBase::relocateAlloc(uint8_t *Buf, uint8_t *BufEnd) {  // For each function-defining prologue, find any calls to __morestack,  // and replace them with calls to __morestack_non_split.  static void switchMorestackCallsToMorestackNonSplit( -    llvm::DenseSet<Defined *>& Prologues, -    std::vector<Relocation *>& MorestackCalls) { +    DenseSet<Defined *> &Prologues, std::vector<Relocation *> &MorestackCalls) {    // If the target adjusted a function's prologue, all calls to    // __morestack inside that function should be switched to @@ -873,9 +872,8 @@ static void switchMorestackCallsToMorestackNonSplit(    }  } -static bool -enclosingPrologueAdjusted(uint64_t Offset, -                          const llvm::DenseSet<Defined *> &Prologues) { +static bool enclosingPrologueAdjusted(uint64_t Offset, +                                      const DenseSet<Defined *> &Prologues) {    for (Defined *F : Prologues)      if (F->Value <= Offset && Offset < F->Value + F->Size)        return true; @@ -891,7 +889,7 @@ void InputSectionBase::adjustSplitStackFunctionPrologues(uint8_t *Buf,                                                           uint8_t *End) {    if (!getFile<ELFT>()->SplitStack)      return; -  llvm::DenseSet<Defined *> AdjustedPrologues; +  DenseSet<Defined *> AdjustedPrologues;    std::vector<Relocation *> MorestackCalls;    for (Relocation &Rel : Relocations) { @@ -1071,8 +1069,7 @@ void MergeInputSection::splitNonStrings(ArrayRef<uint8_t> Data,    bool IsAlloc = Flags & SHF_ALLOC;    for (size_t I = 0; I != Size; I += EntSize) -    Pieces.emplace_back(I, xxHash64(toStringRef(Data.slice(I, EntSize))), -                        !IsAlloc); +    Pieces.emplace_back(I, xxHash64(Data.slice(I, EntSize)), !IsAlloc);  }  template <class ELFT> | 
