Added an assertion since it seems like AdjList returns an errornous size in method

IGNode::pushOnStack().

llvm-svn: 1116
This commit is contained in:
Ruchira Sasanka 2001-11-03 22:01:09 +00:00
parent 033324fc0c
commit 471babe2d2
1 changed files with 7 additions and 2 deletions

View File

@ -15,9 +15,14 @@ IGNode::IGNode(LiveRange *const PLR, unsigned int Ind): Index(Ind),
void IGNode::pushOnStack() // sets on to stack and
{ // reduce the degree of neighbors
OnStack = true;
unsigned int neighs = AdjList.size();
int neighs = AdjList.size();
for(unsigned int i=0; i < neighs; i++) (AdjList[i])->decCurDegree();
if( neighs < 0) {
cout << "\nAdj List size = " << neighs;
assert(0 && "Invalid adj list size");
}
for(int i=0; i < neighs; i++) (AdjList[i])->decCurDegree();
}