From 2c7171bf3ce7bb24d5830ce586ffa07cbabd20c1 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 5 Apr 2017 00:43:45 +0000 Subject: [PATCH] Remove `=` from a lambda that doesn't capture any variable. llvm-svn: 299495 --- lld/ELF/LinkerScript.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 39e5a6d..65bb362 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -314,10 +314,11 @@ static bool matchConstraints(ArrayRef Sections, ConstraintKind Kind) { if (Kind == ConstraintKind::NoConstraint) return true; - bool IsRW = llvm::any_of(Sections, [=](InputSectionBase *Sec2) { - auto *Sec = static_cast(Sec2); - return Sec->Flags & SHF_WRITE; + + bool IsRW = llvm::any_of(Sections, [](InputSectionBase *Sec) { + return static_cast(Sec)->Flags & SHF_WRITE; }); + return (IsRW && Kind == ConstraintKind::ReadWrite) || (!IsRW && Kind == ConstraintKind::ReadOnly); } -- 2.7.4