cloud9_root/src/cloud9/lib/Module/ProgramDependenceGraph.cpp
// returns true if the passed function type has the same types as the passed
// vector of types. Order matters in the passed vector. This assumes that the
// number of types in the passed vector and in the parameters of the passed
// function are the same. Otherwise, this function will crash
returns true if the passed function type has the same types as the passed
vector of types. Order matters in the passed vector. This assumes that the
number of types in the passed vector and in the parameters of the passed
function are the same. Otherwise, this function will crash
returns true if the passed function type has the same types as the passed vector of types . Order matters in the passed vector . This assumes that the number of types in the passed vector and in the parameters of the passed function are the same . Otherwise this function will crash
bool PDG::paramsMatch(FunctionType *fTy, std::vector<Type *> const tys) {
	assert(fTy->getNumParams() == tys.size() && "number of arguments in function does not match vector");
	unsigned pos = 0;
	for (FunctionType::param_iterator pi = fTy->param_begin(), pe = fTy->param_end(); pi != pe; ++pi) {
		Type *t = *pi;
		if (t != tys[pos]) {
			return false;
		}
		pos++;
	}
	return true;
}
bool PDG :: paramsMatch ( FunctionType * fTy , std :: vector < Type * > const tys ) { assert ( fTy -> getNumParams ( ) == tys . size ( ) && " " ) ; unsigned pos = 0 ; for ( FunctionType :: param_iterator pi = fTy -> param_begin ( ) , pe = fTy -> param_end ( ) ; pi != pe ; ++ pi ) { Type * t = * pi ; if ( t != tys [ pos ] ) { return false ; } pos ++ ; } return true ; }
returns true if the passed function type has the same types as the passed
vector of types.
returns true if the passed function type has the same types as the passed vector of types .
// keep track of which argument we are on