[lld] r299208 - Remove unnecessary cast and branch. NFC.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 10:54:47 PDT 2017


Thanks!

On 31 March 2017 at 08:31, James Henderson via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: jhenderson
> Date: Fri Mar 31 07:31:23 2017
> New Revision: 299208
>
> URL: http://llvm.org/viewvc/llvm-project?rev=299208&view=rev
> Log:
> Remove unnecessary cast and branch. NFC.
>
> Modified:
>     lld/trunk/ELF/Relocations.cpp
>
> Modified: lld/trunk/ELF/Relocations.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=299208&r1=299207&r2=299208&view=diff
> ==============================================================================
> --- lld/trunk/ELF/Relocations.cpp (original)
> +++ lld/trunk/ELF/Relocations.cpp Fri Mar 31 07:31:23 2017
> @@ -1003,11 +1003,7 @@ bool elf::createThunks(ArrayRef<OutputSe
>    // We separate the creation of ThunkSections from the insertion of the
>    // ThunkSections back into the OutputSection as ThunkSections are not always
>    // inserted into the same OutputSection as the caller.
> -  for (OutputSection *Base : OutputSections) {
> -    auto *OS = dyn_cast<OutputSection>(Base);
> -    if (OS == nullptr)
> -      continue;
> -
> +  for (OutputSection *OS : OutputSections) {
>      ThunkSection *OSTS = nullptr;
>      for (InputSection *IS : OS->Sections) {
>        for (Relocation &Rel : IS->Relocations) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list