aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-03 23:00:19 +0000
committerChris Lattner <sabre@nondot.org>2004-03-03 23:00:19 +0000
commit76a9eb3e4041f00c92a104d4161a29fd0398bc47 (patch)
tree145acf0ce30e499f71e1351815d8485e3d96295f
parentc4ebdcea7aae1e8ffaa7d2bfd3ae127668097dfb (diff)
downloadexternal_llvm-76a9eb3e4041f00c92a104d4161a29fd0398bc47.zip
external_llvm-76a9eb3e4041f00c92a104d4161a29fd0398bc47.tar.gz
external_llvm-76a9eb3e4041f00c92a104d4161a29fd0398bc47.tar.bz2
Fix a minor bug handling incomplete programs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12105 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/DataStructure/Local.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index a313bd5..c72c9f7 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -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]);
}