projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5053b11
)
Simplify a boolean expression by using the De Morgan's law.
author
Rui Ueyama
<ruiu@google.com>
Tue, 6 Sep 2016 22:50:48 +0000
(22:50 +0000)
committer
Rui Ueyama
<ruiu@google.com>
Tue, 6 Sep 2016 22:50:48 +0000
(22:50 +0000)
llvm-svn: 280766
lld/ELF/LinkerScript.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/LinkerScript.cpp
b/lld/ELF/LinkerScript.cpp
index
8634229
..
5f04382
100644
(file)
--- 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 <class ELFT>