From 8c0cdca99e872a3eea41c715654207c9f3995a89 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Fri, 3 Nov 2017 11:51:58 +0000 Subject: [PATCH] [ELF] - Removed unused variable. NFC. llvm-svn: 317316 --- lld/ELF/Writer.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 944c683..cd5dff7 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -851,15 +851,12 @@ void Writer::forEachRelSec(std::function Fn) { template void Writer::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; } -- 2.7.4