lib/range-analysis/src/OverflowDetect/OverflowDetect.cpp
/*
 * 	In order to be valid, an instruction must be of intBITWIDTH type, and its operands as well
 */
In order to be valid, an instruction must be of intBITWIDTH type, and its operands as well
In order to be valid an instruction must be of intBITWIDTH type and its operands as well
bool OverflowDetect::isValidInst(Instruction *I)
{
	if (dyn_cast<OverflowingBinaryOperator>(I))
		return I->getType()->isIntegerTy() && I->getOperand(0)->getType()->isIntegerTy() && I->getOperand(1)->getType()->isIntegerTy();
	else if (dyn_cast<TruncInst>(I))
		return TruncInstrumentation && I->getType()->isIntegerTy() && I->getOperand(0)->getType()->isIntegerTy();
	else
		return false;
}
bool OverflowDetect :: isValidInst ( Instruction * I ) { if ( dyn_cast < OverflowingBinaryOperator > ( I ) ) return I -> getType ( ) -> isIntegerTy ( ) && I -> getOperand ( 0 ) -> getType ( ) -> isIntegerTy ( ) && I -> getOperand ( 1 ) -> getType ( ) -> isIntegerTy ( ) ; else if ( dyn_cast < TruncInst > ( I ) ) return TruncInstrumentation && I -> getType ( ) -> isIntegerTy ( ) && I -> getOperand ( 0 ) -> getType ( ) -> isIntegerTy ( ) ; else return false ; }
In order to be valid, an instruction must be of intBITWIDTH type, and its operands as well
In order to be valid an instruction must be of intBITWIDTH type and its operands as well