Remove `=` from a lambda that doesn't capture any variable.

llvm-svn: 299495
This commit is contained in:
Rui Ueyama 2017-04-05 00:43:45 +00:00
parent ea93fe00b9
commit 2c7171bf3c
1 changed files with 4 additions and 3 deletions

View File

@ -314,10 +314,11 @@ static bool matchConstraints(ArrayRef<InputSectionBase *> Sections,
ConstraintKind Kind) {
if (Kind == ConstraintKind::NoConstraint)
return true;
bool IsRW = llvm::any_of(Sections, [=](InputSectionBase *Sec2) {
auto *Sec = static_cast<InputSectionBase *>(Sec2);
return Sec->Flags & SHF_WRITE;
bool IsRW = llvm::any_of(Sections, [](InputSectionBase *Sec) {
return static_cast<InputSectionBase *>(Sec)->Flags & SHF_WRITE;
});
return (IsRW && Kind == ConstraintKind::ReadWrite) ||
(!IsRW && Kind == ConstraintKind::ReadOnly);
}