Simplify a boolean expression by using the De Morgan's law.

llvm-svn: 280766
This commit is contained in:
Rui Ueyama 2016-09-06 22:50:48 +00:00
parent 5053b11edc
commit adcdb664cb
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ static bool checkConstraint(uint64_t Flags, ConstraintKind Kind) {
bool RO = (Kind == ConstraintKind::ReadOnly);
bool RW = (Kind == ConstraintKind::ReadWrite);
bool Writable = Flags & SHF_WRITE;
return !((RO && Writable) || (RW && !Writable));
return !(RO && Writable) && !(RW && !Writable);
}
template <class ELFT>