Provide 'static' version of BinaryOperator::isShiftOp().

llvm-svn: 84268
This commit is contained in:
Ted Kremenek 2009-10-16 20:45:04 +00:00
parent 16bef857d9
commit 31fcde13ac
1 changed files with 2 additions and 1 deletions

View File

@ -1673,7 +1673,8 @@ public:
/// predicates to categorize the respective opcodes.
bool isMultiplicativeOp() const { return Opc >= Mul && Opc <= Rem; }
bool isAdditiveOp() const { return Opc == Add || Opc == Sub; }
bool isShiftOp() const { return Opc == Shl || Opc == Shr; }
static bool isShiftOp(Opcode Opc) { return Opc == Shl || Opc == Shr; }
bool isShiftOp() const { return isShiftOp(Opc); }
bool isBitwiseOp() const { return Opc >= And && Opc <= Or; }
static bool isRelationalOp(Opcode Opc) { return Opc >= LT && Opc <= GE; }