diff options
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
-rw-r--r-- | lld/ELF/ScriptParser.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index 874f2c7c439..5894ee973a3 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -160,9 +160,6 @@ static ExprValue bitOr(ExprValue A, ExprValue B) { (A.getValue() | B.getValue()) - A.getSecAddr()}; } -static ExprValue bitNot(ExprValue A) { return ~A.getValue(); } -static ExprValue minus(ExprValue A) { return -A.getValue(); } - void ScriptParser::readDynamicList() { expect("{"); readAnonymousDeclaration(); @@ -828,11 +825,11 @@ Expr ScriptParser::readPrimary() { if (Tok == "~") { Expr E = readPrimary(); - return [=] { return bitNot(E()); }; + return [=] { return ~E().getValue(); }; } if (Tok == "-") { Expr E = readPrimary(); - return [=] { return minus(E()); }; + return [=] { return -E().getValue(); }; } // Built-in functions are parsed here. |