[lld] r299580 - Inline small functions that are used only once.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 12:21:16 PDT 2017
Author: ruiu
Date: Wed Apr 5 14:21:15 2017
New Revision: 299580
URL: http://llvm.org/viewvc/llvm-project?rev=299580&view=rev
Log:
Inline small functions that are used only once.
Modified:
lld/trunk/ELF/ScriptParser.cpp
Modified: lld/trunk/ELF/ScriptParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ScriptParser.cpp?rev=299580&r1=299579&r2=299580&view=diff
==============================================================================
--- lld/trunk/ELF/ScriptParser.cpp (original)
+++ lld/trunk/ELF/ScriptParser.cpp Wed Apr 5 14:21:15 2017
@@ -160,9 +160,6 @@ static ExprValue bitOr(ExprValue A, Expr
(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.
More information about the llvm-commits
mailing list