Remove useless cast.

llvm-svn: 315421
This commit is contained in:
Rui Ueyama
2017-10-11 02:55:05 +00:00
parent 04c9ca7408
commit b801441ed3

View File

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