aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-13 20:36:01 +0000
committerChris Lattner <sabre@nondot.org>2005-03-13 20:36:01 +0000
commite2bc7b2517efe8256289a0b7cdab3dd3545e7c63 (patch)
treee0d7f5c1934ab44f402747c25c7f22d99dc49636 /lib/Analysis/DataStructure
parent270cf5025e8a0bfd81528d2090353e49ea41f848 (diff)
regardless of whether or not the client things we should mark globals incomplete,
ALWAYS mark them incomplete if they are external! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20586 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index 9e97b8a3db..212e11829a 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/lib/Analysis/DataStructure/DataStructure.cpp
@@ -1498,13 +1498,13 @@ void DSGraph::markIncompleteNodes(unsigned Flags) {
E = AuxFunctionCalls.end(); I != E; ++I)
markIncomplete(*I);
- // Mark all global nodes as incomplete...
- if ((Flags & DSGraph::IgnoreGlobals) == 0)
- 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() || !GV->hasInitializer())
- markIncompleteNode(ScalarMap[GV].getNode());
+ // Mark all global nodes as incomplete.
+ for (DSScalarMap::global_iterator I = ScalarMap.global_begin(),
+ E = ScalarMap.global_end(); I != E; ++I)
+ if (GlobalVariable *GV = dyn_cast<GlobalVariable>(*I))
+ if (!GV->hasInitializer() || // Always mark external globals incomp.
+ (!GV->isConstant() && (Flags & DSGraph::IgnoreGlobals) == 0))
+ markIncompleteNode(ScalarMap[GV].getNode());
}
static inline void killIfUselessEdge(DSNodeHandle &Edge) {