[lld] r301661 - Remove a redundant local variable.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 10:50:23 PDT 2017


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.




More information about the llvm-commits mailing list