aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-08 03:52:24 +0000
committerChris Lattner <sabre@nondot.org>2004-03-08 03:52:24 +0000
commitd84d3501c61ffa0ffa259c83a169b45e25dcbdfb (patch)
tree2714cb56707a84d79bc0a2c901e64229b9af82a2 /lib/Analysis
parent9b3c70261419bca20fa26e939116696a02f4e975 (diff)
downloadexternal_llvm-d84d3501c61ffa0ffa259c83a169b45e25dcbdfb.zip
external_llvm-d84d3501c61ffa0ffa259c83a169b45e25dcbdfb.tar.gz
external_llvm-d84d3501c61ffa0ffa259c83a169b45e25dcbdfb.tar.bz2
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
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index e3430e7..2421854 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/lib/Analysis/DataStructure/DataStructure.cpp
@@ -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());
}