Example #1
0
void Block::resolveTargets(FlowPtr f) {
	//iterate over the hard targets of this block
	std::set<uint64_t>::iterator	it = this->HardTargets.begin();
	std::set<uint64_t>::iterator	e = this->HardTargets.end();
	
	while( it != e ) {
		unsigned long long target = *it;
		//resolve each hard target to a block in the flow
		BlockPtr b = f->getBlockWithAddr(target);

		//insert this blocks ID into the list of targeted IDs
		this->TargetIDs.push_back(b->getBlockId());

		++it;
	}
	return;
}