[lld] r301661 - Remove a redundant local variable.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 11:32:31 PDT 2017
Why do we need CurSection? If two sections have the same name we will only print one, no?
Cheers,
Rafael
On April 28, 2017 1:50:23 PM EDT, Rui Ueyama via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>Author: ruiu
>Date: Fri Apr 28 12:50:23 2017
>New Revision: 301661
>
>URL: http://llvm.org/viewvc/llvm-project?rev=301661&view=rev
>Log:
>Remove a redundant local variable.
>
>Modified:
> lld/trunk/ELF/MapFile.cpp
>
>Modified: lld/trunk/ELF/MapFile.cpp
>URL:
>http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=301661&r1=301660&r2=301661&view=diff
>==============================================================================
>--- lld/trunk/ELF/MapFile.cpp (original)
>+++ lld/trunk/ELF/MapFile.cpp Fri Apr 28 12:50:23 2017
>@@ -117,12 +117,11 @@ void PrettyPrinter<ELFT>::writeInputSect
> // 00201000 0000000e 4 test.o
> //
> // once for each new input section.
>- StringRef Name = IS->Name;
>- if (Name != CurSection) {
>+ if (IS->Name != CurSection) {
> writeHeader<ELFT>(OS, IS->OutSec->Addr + IS->OutSecOff, IS->getSize(),
> IS->Alignment);
>- OS << indent(1) << left_justify(Name, 7) << '\n';
>- CurSection = Name;
>+ OS << indent(1) << left_justify(IS->Name, 7) << '\n';
>+ CurSection = IS->Name;
> }
>
> // Write a line for each symbol defined in the given section.
>
>
>_______________________________________________
>llvm-commits mailing list
>llvm-commits at lists.llvm.org
>http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170428/e27ba8e3/attachment.html>
More information about the llvm-commits
mailing list