regardless of whether or not the client things we should mark globals incomplete,
authorChris Lattner <sabre@nondot.org>
Sun, 13 Mar 2005 20:36:01 +0000 (20:36 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 13 Mar 2005 20:36:01 +0000 (20:36 +0000)
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

lib/Analysis/DataStructure/DataStructure.cpp

index 9e97b8a3dbc6f6e392294a5f2eb55b59250b4e60..212e11829a9e666714de8f732c08c0d50b5ff79f 100644 (file)
@@ -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) {