Fix a minor bug handling incomplete programs
authorChris Lattner <sabre@nondot.org>
Wed, 3 Mar 2004 23:00:19 +0000 (23:00 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 3 Mar 2004 23:00:19 +0000 (23:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12105 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/Local.cpp

index a313bd5c5663ac649b8b2ae4c0a69770495c65fb..c72c9f72fcc027dbdb1643d354989db64f76734f 100644 (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]);
   }