Patch implements <,>,!=,==,>=,<= operators.
Actually in freebsd scripts I think I saw only != operator,
but since it is easy to support all at once - desided to do that.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/LinkerScript.cpp | ||
---|---|---|
152 ↗ | (On Diff #54671) | Trivial comment, but why not L != R here? And, why not just return L < R;, return L > R; etc. in general? For me at least ? 1 : 0 is not any more clear/readable. |
ELF/LinkerScript.cpp | ||
---|---|---|
152 ↗ | (On Diff #54671) | I think you right. I`ll change that. |
ELF/LinkerScript.cpp | ||
---|---|---|
51–61 ↗ | (On Diff #54674) | These operator precedences are not correct. * and / should have the same precedence, and so are + and -. & has lower precedence over comparison operators. https://www.sourceware.org/binutils/docs-2.10/ld_3.html#SEC45 |
ELF/LinkerScript.cpp | ||
---|---|---|
51–61 ↗ | (On Diff #54674) | Also, please don't use precedence 0. We pass 0 as the minimum precedence in parseExpr. It doesn't expect that there is an operator with precedence 0. |
ELF/LinkerScript.cpp | ||
---|---|---|
51–61 ↗ | (On Diff #54674) | Yes, I messed up these accidentally :( will fix. |
- Addressed review comments.
ELF/LinkerScript.cpp | ||
---|---|---|
51–61 ↗ | (On Diff #54674) | I used c++ precedence for added ones, btw: http://en.cppreference.com/w/cpp/language/operator_precedence. |
LGTM with a nit.
ELF/LinkerScript.cpp | ||
---|---|---|
121–147 ↗ | (On Diff #54734) | Let's sort them in the same order as the operator precedence. |