Fine-grainify namespaces for this library
authorChris Lattner <sabre@nondot.org>
Wed, 12 Nov 2003 23:11:14 +0000 (23:11 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 12 Nov 2003 23:11:14 +0000 (23:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9948 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/BottomUpClosure.cpp
lib/Analysis/DataStructure/DataStructure.cpp
lib/Analysis/DataStructure/DataStructureAA.cpp
lib/Analysis/DataStructure/DataStructureOpt.cpp
lib/Analysis/DataStructure/DataStructureStats.cpp
lib/Analysis/DataStructure/GraphChecker.cpp
lib/Analysis/DataStructure/Local.cpp
lib/Analysis/DataStructure/Printer.cpp
lib/Analysis/DataStructure/Steensgaard.cpp
lib/Analysis/DataStructure/TopDownClosure.cpp

index 66990fd9230ff66b01937385175f55b1274f14c3..ea4a326fbeb7f56eafe0ce1dcc48e7a1dcfdcabe 100644 (file)
@@ -19,8 +19,7 @@
 #include "Support/Statistic.h"
 #include "Support/Debug.h"
 #include "DSCallSiteIterator.h"
-
-namespace llvm {
+using namespace llvm;
 
 namespace {
   Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph");
@@ -317,5 +316,3 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) {
 
   //Graph.writeGraphToFile(std::cerr, "bu_" + F.getName());
 }
-
-} // End llvm namespace
index c970e2e14a33590c44a8ff54c9a44e4a9ed23056..60513959f82d90f697b3a0f1b27052d1ec1c0110 100644 (file)
@@ -22,8 +22,7 @@
 #include "Support/Statistic.h"
 #include "Support/Timer.h"
 #include <algorithm>
-
-namespace llvm {
+using namespace llvm;
 
 namespace {
   Statistic<> NumFolds          ("dsnode", "Number of nodes completely folded");
@@ -1672,5 +1671,3 @@ void DSGraph::computeNodeMapping(const DSNodeHandle &NH1,
     if (unsigned(N2Idx)+i < N2Size)
       computeNodeMapping(N1->getLink(i), N2->getLink(N2Idx+i), NodeMap);
 }
-
-} // End llvm namespace
index 4b55da7aa5442fbbd7208fca47be506ac36b4576..cbc13cec25f201e0014ef08bf4f20e96d5383c99 100644 (file)
@@ -16,8 +16,7 @@
 #include "llvm/Analysis/DSGraph.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Module.h"
-
-namespace llvm {
+using namespace llvm;
 
 namespace {
   class DSAA : public Pass, public AliasAnalysis {
@@ -179,4 +178,3 @@ void DSAA::getMustAliases(Value *P, std::vector<Value*> &RetVals) {
   return getAnalysis<AliasAnalysis>().getMustAliases(P, RetVals);
 }
 
-} // End llvm namespace
index d037b52145ec2cc48fdcc0a4ce4fba66be54a962..b213ecd79b9ff5060799a4e02964f89e8b0dfdd4 100644 (file)
@@ -17,8 +17,7 @@
 #include "llvm/Module.h"
 #include "llvm/Constant.h"
 #include "Support/Statistic.h"
-
-namespace llvm {
+using namespace llvm;
 
 namespace {
   Statistic<>
@@ -97,5 +96,3 @@ bool DSOpt::OptimizeGlobals(Module &M) {
     }
   return Changed;
 }
-
-} // End llvm namespace
index 3659c906973173446058427f0f4cc637446156ff..a48223e0edfc43bbd45a32f6e03784654749326d 100644 (file)
@@ -18,8 +18,7 @@
 #include "llvm/Support/InstVisitor.h"
 #include "Support/Statistic.h"
 #include <vector>
-
-namespace llvm {
+using namespace llvm;
 
 namespace {
   Statistic<> TotalNumCallees("totalcallees",
@@ -141,5 +140,3 @@ bool DSGraphStats::runOnFunction(Function& F) {
   visit(F);
   return true;
 }
-
-} // End llvm namespace
index 11ebc6920cb45fa81bce2d312c150da0da0a0bda..6d78621c11c87c26bad13f5593bc5b7069d9f21f 100644 (file)
@@ -29,7 +29,7 @@
 #include "llvm/Value.h"
 #include <set>
 
-namespace llvm {
+using namespace llvm;
 
 namespace {
   enum DSPass { local, bu, td };
@@ -195,5 +195,3 @@ void DSGC::verify(const DSGraph &G) {
       }
   }
 }
-
-} // End llvm namespace
index 253cbf7a3511f216745b84e7251c880040b5d057..a7b2579612df6d0748a9d54d3fc42ad8b3f1328a 100644 (file)
 //
 #include "llvm/Module.h"
 
-namespace llvm {
+using namespace llvm;
 
 static RegisterAnalysis<LocalDataStructures>
 X("datastructure", "Local Data Structure Analysis");
 
+namespace llvm {
 namespace DS {
   // isPointerType - Return true if this type is big enough to hold a pointer.
   bool isPointerType(const Type *Ty) {
@@ -42,7 +43,7 @@ namespace DS {
       return Ty->getPrimitiveSize() >= PointerSize;
     return false;
   }
-}
+}}
 
 using namespace DS;
 
@@ -622,4 +623,3 @@ void LocalDataStructures::releaseMemory() {
   GlobalsGraph = 0;
 }
 
-} // End llvm namespace
index d6f6c02cc210ecf4c4a025fa2b1f139627324024..ae528aeb345ec393d617cdb350f85809c5f53229 100644 (file)
@@ -22,8 +22,7 @@
 #include "Support/Statistic.h"
 #include <fstream>
 #include <sstream>
-
-namespace llvm {
+using namespace llvm;
 
 // OnlyPrintMain - The DataStructure printer exposes this option to allow
 // printing of only the graph for "main".
@@ -73,6 +72,7 @@ static std::string getCaption(const DSNode *N, const DSGraph *G) {
   return OS.str();
 }
 
+namespace llvm {
 template<>
 struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
   static std::string getGraphName(const DSGraph *G) {
@@ -179,6 +179,7 @@ struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
     }
   }
 };
+}   // end namespace llvm
 
 void DSNode::print(std::ostream &O, const DSGraph *G) const {
   GraphWriter<const DSGraph *> W(O, G);
@@ -282,4 +283,3 @@ void TDDataStructures::print(std::ostream &O, const Module *M) const {
   printCollection(*this, O, M, "td.");
 }
 
-} // End llvm namespace
index d868d250f7bcecab9188d10ce93fcf92202e8741..27daa186d27c21856042312157f6d2a2942738a5 100644 (file)
@@ -19,8 +19,7 @@
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Module.h"
 #include "Support/Debug.h"
-
-namespace llvm {
+using namespace llvm;
 
 namespace {
   class Steens : public Pass, public AliasAnalysis {
@@ -236,5 +235,3 @@ AliasAnalysis::AliasResult Steens::alias(const Value *V1, unsigned V1Size,
   //
   return getAnalysis<AliasAnalysis>().alias(V1, V1Size, V2, V2Size);
 }
-
-} // End llvm namespace
index 696368a866e84ed2a545895828ab29c381350f42..6912af437b700e53dbdec35d50e6619716c82308 100644 (file)
@@ -20,8 +20,7 @@
 #include "llvm/Analysis/DSGraph.h"
 #include "Support/Debug.h"
 #include "Support/Statistic.h"
-
-namespace llvm {
+using namespace llvm;
 
 namespace {
   RegisterAnalysis<TDDataStructures>   // Register the pass
@@ -311,5 +310,3 @@ void TDDataStructures::inlineGraphIntoCallees(DSGraph &Graph) {
         << Graph.getFunctionNames() << " [" << Graph.getGraphSize() << "+"
         << Graph.getFunctionCalls().size() << "]\n");
 }
-
-} // End llvm namespace