[ELF] - Removed unused variable. NFC.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 3 Nov 2017 11:51:58 +0000 (11:51 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 3 Nov 2017 11:51:58 +0000 (11:51 +0000)
llvm-svn: 317316

lld/ELF/Writer.cpp

index 944c683..cd5dff7 100644 (file)
@@ -851,15 +851,12 @@ void Writer<ELFT>::forEachRelSec(std::function<void(InputSectionBase &)> Fn) {
 template <class ELFT> void Writer<ELFT>::setReservedSymbolSections() {
   PhdrEntry *Last = nullptr;
   PhdrEntry *LastRO = nullptr;
-  PhdrEntry *LastRW = nullptr;
 
   for (PhdrEntry *P : Phdrs) {
     if (P->p_type != PT_LOAD)
       continue;
     Last = P;
-    if (P->p_flags & PF_W)
-      LastRW = P;
-    else
+    if (!(P->p_flags & PF_W))
       LastRO = P;
   }