[PATCH] D25234: [LLD][ARM] Garbage collection support for .ARM.exidx sections

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 12:47:05 PDT 2016


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



> InputFiles.cpp:148
>    initializeSymbols();
> +  if (Config->GcSections && Config->EMachine == EM_ARM )
> +    initializeReverseDependencies();

clang-format-diff please.

> InputFiles.cpp:275
> +      continue;
> +    if (Sec.sh_flags & SHF_LINK_ORDER) {
> +      if (Sec.sh_link >= Sections.size())

Reverse the condition and continue earlier.

> InputFiles.cpp:279
> +              Twine(Sec.sh_link));
> +      auto *IS = dyn_cast<InputSection<ELFT>>(Sections[Sec.sh_link]);
> +      IS->DependentSection = Sections[I];

It is not expected to fail, so dyn_cast -> cast.

https://reviews.llvm.org/D25234





More information about the llvm-commits mailing list