diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-08-12 00:36:56 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-08-12 00:36:56 +0000 |
| commit | e5cc668eb823dc8eb0e6013289846d25b6e82293 (patch) | |
| tree | 65db4a4aef0824f025e3e1846e124c2339181e72 | |
| parent | 48c3f1cebcb24504ad66ae2e23777ef9f8b11599 (diff) | |
| download | bcm5719-llvm-e5cc668eb823dc8eb0e6013289846d25b6e82293.tar.gz bcm5719-llvm-e5cc668eb823dc8eb0e6013289846d25b6e82293.zip | |
Remove useless local variable.
llvm-svn: 278446
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 8cfb17a06e9..42b34e379e5 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -386,13 +386,12 @@ template <class ELFT> void assignOffsets(OutputSectionBase<ELFT> *Sec) { } template <class ELFT> void LinkerScript<ELFT>::assignAddresses() { - ArrayRef<OutputSectionBase<ELFT> *> Sections = *OutputSections; // Orphan sections are sections present in the input files which // are not explicitly placed into the output file by the linker script. // We place orphan sections at end of file. // Other linkers places them using some heuristics as described in // https://sourceware.org/binutils/docs/ld/Orphan-Sections.html#Orphan-Sections. - for (OutputSectionBase<ELFT> *Sec : Sections) { + for (OutputSectionBase<ELFT> *Sec : *OutputSections) { StringRef Name = Sec->getName(); if (getSectionIndex(Name) == INT_MAX) Opt.Commands.push_back(llvm::make_unique<OutputSectionCommand>(Name)); @@ -422,7 +421,7 @@ template <class ELFT> void LinkerScript<ELFT>::assignAddresses() { // one section with such name, if the alignment, flags or type // attribute differs. auto *Cmd = cast<OutputSectionCommand>(Base.get()); - for (OutputSectionBase<ELFT> *Sec : Sections) { + for (OutputSectionBase<ELFT> *Sec : *OutputSections) { if (Sec->getName() != Cmd->Name) continue; |

