* Fix a bug where global incompleteness marking would not mark the global
authorChris Lattner <sabre@nondot.org>
Sun, 9 Feb 2003 18:41:49 +0000 (18:41 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 9 Feb 2003 18:41:49 +0000 (18:41 +0000)
  itself incomplete!
* Allow incompleteness callers to specify they don't want globals to be
  considered sources of incompleteness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5513 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/DataStructure.cpp

index bf487d85d76c5d5b9f03810ef370a70d4487435d..30ce4f9baf616d85694b9177d749d98d3b7ee09e 100644 (file)
@@ -766,14 +766,11 @@ void DSGraph::markIncompleteNodes(unsigned Flags) {
       markIncomplete(AuxFunctionCalls[i]);
     
 
-  // Mark all of the nodes pointed to by global nodes as incomplete...
-  for (unsigned i = 0, e = Nodes.size(); i != e; ++i)
-    if (Nodes[i]->NodeType & DSNode::GlobalNode) {
-      DSNode *N = Nodes[i];
-      for (unsigned i = 0, e = N->getSize(); i < e; i += DS::PointerSize)
-        if (DSNode *DSN = N->getLink(i).getNode())
-          markIncompleteNode(DSN);
-    }
+  // Mark all global nodes as incomplete...
+  if ((Flags & DSGraph::IgnoreGlobals) == 0)
+    for (unsigned i = 0, e = Nodes.size(); i != e; ++i)
+      if (Nodes[i]->NodeType & DSNode::GlobalNode)
+        markIncompleteNode(Nodes[i]);
 }
 
 static inline void killIfUselessEdge(DSNodeHandle &Edge) {