<html><head></head><body>Why do we need CurSection? If two sections have the same name we will only print one, no?<br>
<br>
Cheers,<br>
Rafael<br><br><div class="gmail_quote">On April 28, 2017 1:50:23 PM EDT, Rui Ueyama via llvm-commits <llvm-commits@lists.llvm.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Author: ruiu<br />Date: Fri Apr 28 12:50:23 2017<br />New Revision: 301661<br /><br />URL: <a href="http://llvm.org/viewvc/llvm-project?rev=301661&view=rev">http://llvm.org/viewvc/llvm-project?rev=301661&view=rev</a><br />Log:<br />Remove a redundant local variable.<br /><br />Modified:<br />    lld/trunk/ELF/MapFile.cpp<br /><br />Modified: lld/trunk/ELF/MapFile.cpp<br />URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=301661&r1=301660&r2=301661&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=301661&r1=301660&r2=301661&view=diff</a><br /><hr /><br />--- lld/trunk/ELF/MapFile.cpp (original)<br />+++ lld/trunk/ELF/MapFile.cpp Fri Apr 28 12:50:23 2017<br />@@ -117,12 +117,11 @@ void PrettyPrinter<ELFT>::writeInputSect<br />   //   00201000 0000000e     4                 test.o<br />   //<br />   // once for each new input section.<br />-  StringRef Name = IS->Name;<br />-  if (Name != CurSection) {<br />+  if (IS->Name != CurSection) {<br />     writeHeader<ELFT>(OS, IS->OutSec->Addr + IS->OutSecOff, IS->getSize(),<br />                       IS->Alignment);<br />-    OS << indent(1) << left_justify(Name, 7) << '\n';<br />-    CurSection = Name;<br />+    OS << indent(1) << left_justify(IS->Name, 7) << '\n';<br />+    CurSection = IS->Name;<br />   }<br /> <br />   // Write a line for each symbol defined in the given section.<br /><br /><br /><hr /><br />llvm-commits mailing list<br />llvm-commits@lists.llvm.org<br /><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br /></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>