summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-03-20 14:35:41 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-03-20 14:35:41 +0000
commit195f23c53bb09d266b18c24519cf9bd0589972a0 (patch)
tree4deca3d036bb9ce3469050aae4462cf471a84044
parent49592cf67948b720be7d09a3811304a5f91016a8 (diff)
downloadbcm5719-llvm-195f23c53bb09d266b18c24519cf9bd0589972a0.tar.gz
bcm5719-llvm-195f23c53bb09d266b18c24519cf9bd0589972a0.zip
Inline a few functions.
I don't foresee having to makes these functions any stricter or fancier, so it probably makes sense to inline them. llvm-svn: 298252
-rw-r--r--lld/ELF/LinkerScript.cpp30
1 files changed, 6 insertions, 24 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 9e66151598a..c36d55236ff 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -96,24 +96,6 @@ static ExprValue leftShift(ExprValue A, ExprValue B) {
static ExprValue rightShift(ExprValue A, ExprValue B) {
return A.getValue() >> B.getValue();
}
-static ExprValue lessThan(ExprValue A, ExprValue B) {
- return A.getValue() < B.getValue();
-}
-static ExprValue greaterThan(ExprValue A, ExprValue B) {
- return A.getValue() > B.getValue();
-}
-static ExprValue greaterThanOrEqual(ExprValue A, ExprValue B) {
- return A.getValue() >= B.getValue();
-}
-static ExprValue lessThanOrEqual(ExprValue A, ExprValue B) {
- return A.getValue() <= B.getValue();
-}
-static ExprValue equal(ExprValue A, ExprValue B) {
- return A.getValue() == B.getValue();
-}
-static ExprValue notEqual(ExprValue A, ExprValue B) {
- return A.getValue() != B.getValue();
-}
static ExprValue bitAnd(ExprValue A, ExprValue B) {
moveAbsRight(A, B);
return {A.Sec, A.ForceAbsolute,
@@ -1674,17 +1656,17 @@ static Expr combine(StringRef Op, Expr L, Expr R) {
if (Op == ">>")
return [=] { return rightShift(L(), R()); };
if (Op == "<")
- return [=] { return lessThan(L(), R()); };
+ return [=] { return L().getValue() < R().getValue(); };
if (Op == ">")
- return [=] { return greaterThan(L(), R()); };
+ return [=] { return L().getValue() > R().getValue(); };
if (Op == ">=")
- return [=] { return greaterThanOrEqual(L(), R()); };
+ return [=] { return L().getValue() >= R().getValue(); };
if (Op == "<=")
- return [=] { return lessThanOrEqual(L(), R()); };
+ return [=] { return L().getValue() <= R().getValue(); };
if (Op == "==")
- return [=] { return ::equal(L(), R()); };
+ return [=] { return L().getValue() == R().getValue(); };
if (Op == "!=")
- return [=] { return notEqual(L(), R()); };
+ return [=] { return L().getValue() != R().getValue(); };
if (Op == "&")
return [=] { return bitAnd(L(), R()); };
if (Op == "|")
OpenPOWER on IntegriCloud