Fix a bug handling globals that are constants, but are still external

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12208 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-03-08 03:52:24 +00:00
parent 9b3c702614
commit d84d3501c6

View File

@ -1441,7 +1441,7 @@ void DSGraph::markIncompleteNodes(unsigned Flags) {
for (DSScalarMap::global_iterator I = ScalarMap.global_begin(),
E = ScalarMap.global_end(); I != E; ++I)
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(*I))
if (!GV->isConstant())
if (!GV->isConstant() || !GV->hasInitializer())
markIncompleteNode(ScalarMap[GV].getNode());
}