Inline leftShift and rightShift. NFC.

llvm-svn: 299518
This commit is contained in:
Rui Ueyama 2017-04-05 05:40:01 +00:00
parent 06fdf48a59
commit 7e9155115e
1 changed files with 2 additions and 10 deletions

View File

@ -142,14 +142,6 @@ static ExprValue div(ExprValue A, ExprValue B) {
return 0;
}
static ExprValue leftShift(ExprValue A, ExprValue B) {
return A.getValue() << B.getValue();
}
static ExprValue rightShift(ExprValue A, ExprValue B) {
return A.getValue() >> B.getValue();
}
static ExprValue bitAnd(ExprValue A, ExprValue B) {
moveAbsRight(A, B);
return {A.Sec, A.ForceAbsolute,
@ -708,9 +700,9 @@ static Expr combine(StringRef Op, Expr L, Expr R) {
if (Op == "-")
return [=] { return sub(L(), R()); };
if (Op == "<<")
return [=] { return leftShift(L(), R()); };
return [=] { return L().getValue() << R().getValue(); };
if (Op == ">>")
return [=] { return rightShift(L(), R()); };
return [=] { return L().getValue() >> R().getValue(); };
if (Op == "<")
return [=] { return L().getValue() < R().getValue(); };
if (Op == ">")