*** empty log message ***


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index 248ed91..8d53b41 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/lib/Analysis/DataStructure/DataStructure.cpp
@@ -6,7 +6,6 @@
 
 #include "llvm/Analysis/DataStructure.h"
 #include "llvm/Module.h"
-#include "llvm/Function.h"
 #include <fstream>
 #include <algorithm>
 
@@ -42,9 +41,9 @@
     timeval TV1, TV2;
     gettimeofday(&TV1, 0);
     for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
-      if (!(*I)->isExternal()) {
-        getDSGraph(*I);
-        getClosedDSGraph(*I);
+      if (!I->isExternal() && I->getName() == "main") {
+        //getDSGraph(*I);
+        getClosedDSGraph(I);
       }
     gettimeofday(&TV2, 0);
     cerr << "Analysis took "
@@ -53,9 +52,9 @@
   }
 
   for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
-    if (!(*I)->isExternal()) {
+    if (!I->isExternal()) {
 
-      string Filename = "ds." + (*I)->getName() + ".dot";
+      string Filename = "ds." + I->getName() + ".dot";
       O << "Writing '" << Filename << "'...";
       ofstream F(Filename.c_str());
       if (F.good()) {
@@ -65,8 +64,8 @@
           << "\tsize=\"10,7.5\";\n"
           << "\trotate=\"90\";\n";
 
-        getDSGraph(*I).printFunction(F, "Local");
-        getClosedDSGraph(*I).printFunction(F, "Closed");
+        getDSGraph(I).printFunction(F, "Local");
+        getClosedDSGraph(I).printFunction(F, "Closed");
 
         F << "}\n";
       } else {
@@ -74,8 +73,8 @@
       }
 
       if (Time) 
-        O << " [" << getDSGraph(*I).getGraphSize() << ", "
-          << getClosedDSGraph(*I).getGraphSize() << "]\n";
+        O << " [" << getDSGraph(I).getGraphSize() << ", "
+          << getClosedDSGraph(I).getGraphSize() << "]\n";
       else
         O << "\n";
     }