From: Rui Ueyama Date: Tue, 6 Sep 2016 22:50:48 +0000 (+0000) Subject: Simplify a boolean expression by using the De Morgan's law. X-Git-Tag: llvmorg-4.0.0-rc1~10505 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=adcdb664cb6f4868fa7012132c9355bac815ec75;p=platform%2Fupstream%2Fllvm.git Simplify a boolean expression by using the De Morgan's law. llvm-svn: 280766 --- diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 8634229..5f04382 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -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