Move invariants outside of a lambda. NFC.

llvm-svn: 277791
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index a2f611a..661f693 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -213,11 +213,11 @@
     if (Cmd->Constraint == ConstraintKind::NoConstraint)
       continue;
 
+    bool RO = (Cmd->Constraint == ConstraintKind::ReadOnly);
+    bool RW = (Cmd->Constraint == ConstraintKind::ReadWrite);
+
     removeElementsIf(*OutputSections, [&](OutputSectionBase<ELFT> *S) {
       bool Writable = (S->getFlags() & SHF_WRITE);
-      bool RO = (Cmd->Constraint == ConstraintKind::ReadOnly);
-      bool RW = (Cmd->Constraint == ConstraintKind::ReadWrite);
-
       return S->getName() == Cmd->Name &&
              ((RO && Writable) || (RW && !Writable));
     });