mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 07:57:36 +08:00
Inline leftShift and rightShift. NFC.
llvm-svn: 299518
This commit is contained in:
@@ -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 == ">")
|
||||
|
||||
Reference in New Issue
Block a user