diff options
author | Rui Ueyama <ruiu@google.com> | 2017-04-05 19:21:15 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-04-05 19:21:15 +0000 |
commit | b2fb84a1fa8504cf378cf3a344ec8790161561dd (patch) | |
tree | 123b020d1841607c0ea0e7cf989290cc092d8c63 /lld/ELF/ScriptParser.cpp | |
parent | 03fc8d1e0d0fcc9c0e96eedbf44c3ad71544a2ef (diff) | |
download | bcm5719-llvm-b2fb84a1fa8504cf378cf3a344ec8790161561dd.tar.gz bcm5719-llvm-b2fb84a1fa8504cf378cf3a344ec8790161561dd.zip |
Inline small functions that are used only once.
llvm-svn: 299580
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. |