Fix a minor bug handling incomplete programs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12105 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-03-03 23:00:19 +00:00
parent c4ebdcea7a
commit 76a9eb3e40

View File

@ -185,7 +185,7 @@ DSGraph::DSGraph(const TargetData &td, Function &F, DSGraph *GG)
for (DSScalarMap::global_iterator I = ScalarMap.global_begin();
I != ScalarMap.global_end(); ++I)
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(*I))
if (GV->isConstant())
if (!GV->isExternal() && GV->isConstant())
RC.merge(ScalarMap[GV], GG->ScalarMap[GV]);
}