[lld] r307211 - Using existing variable. NFC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 15:15:59 PDT 2017


Author: rafael
Date: Wed Jul  5 15:15:58 2017
New Revision: 307211

URL: http://llvm.org/viewvc/llvm-project?rev=307211&view=rev
Log:
Using existing variable. NFC.

Modified:
    lld/trunk/ELF/Relocations.cpp

Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=307211&r1=307210&r2=307211&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Wed Jul  5 15:15:58 2017
@@ -1073,13 +1073,12 @@ void ThunkCreator::forEachExecInputSecti
     OutputSection *OS = Cmd->Sec;
     if (!(OS->Flags & SHF_ALLOC) || !(OS->Flags & SHF_EXECINSTR))
       continue;
-    if (OutputSectionCommand *C = Script->getCmd(OS))
-      for (BaseCommand *BC : C->Commands)
-        if (auto *ISD = dyn_cast<InputSectionDescription>(BC)) {
-          CurTS = nullptr;
-          for (InputSection* IS : ISD->Sections)
-            Fn(OS, &ISD->Sections, IS);
-        }
+    for (BaseCommand *BC : Cmd->Commands)
+      if (auto *ISD = dyn_cast<InputSectionDescription>(BC)) {
+        CurTS = nullptr;
+        for (InputSection *IS : ISD->Sections)
+          Fn(OS, &ISD->Sections, IS);
+      }
   }
 }
 




More information about the llvm-commits mailing list