Fix a bug that caused the pass to go into infinite loops on trivial testcases.

This is fallout of the Bug 122 changes.

llvm-svn: 15811
This commit is contained in:
Chris Lattner 2004-08-16 05:38:02 +00:00
parent f2e9ea2106
commit 12324753f2
1 changed files with 2 additions and 1 deletions

View File

@ -251,7 +251,8 @@ namespace {
///
Node *getNode(Value *V) {
if (Constant *C = dyn_cast<Constant>(V))
return getNodeForConstantPointer(C);
if (!isa<GlobalValue>(C))
return getNodeForConstantPointer(C);
std::map<Value*, unsigned>::iterator I = ValueNodes.find(V);
if (I == ValueNodes.end()) {