[LLVMdev] Breakage in CVS?

David Crowe dcrowe at tremor.crhc.uiuc.edu
Thu Nov 28 13:24:01 PST 2002


The following function produces a segv when the begin() is taken from 
vmap, the ScalarMap...

bool StaticMemAnalysis::isSingleMalloc(DSGraph* theGraph,DSNode* theNode) 
{
	int count = 0;
	std::map<Value*, DSNodeHandle>& vmap = theGraph->getScalarMap();
	for (std::map<Value*, DSNodeHandle>::iterator i = vmap.begin(); i 
!= vmap.end(); ++i) {
		if(i->second.getNode() == theNode) {
			if(isa<MallocInst>(i->first)) count++;
		}
	}
	if(count == 1) return true;
	return false;
}

This code used to work...  Has something changed or is our code wrong?  I 
rebuilt two days ago...

Dave




More information about the llvm-dev mailing list