diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-12 23:11:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-12 23:11:14 +0000 |
commit | 9a92729581c85891ae86d28281bdec7b5e4a702d (patch) | |
tree | 9ad49e10ea1155327fdb882f920038e67ddea7d9 /lib/Analysis | |
parent | bfcadffd4c1f70e22748068f0335f40d307c07f0 (diff) |
Fine-grainify namespaces for this library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DataStructure/BottomUpClosure.cpp | 5 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 5 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/DataStructureAA.cpp | 4 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/DataStructureOpt.cpp | 5 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/DataStructureStats.cpp | 5 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/GraphChecker.cpp | 4 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 6 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Printer.cpp | 6 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Steensgaard.cpp | 5 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/TopDownClosure.cpp | 5 |
10 files changed, 14 insertions, 36 deletions
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp index 66990fd9230..ea4a326fbeb 100644 --- a/lib/Analysis/DataStructure/BottomUpClosure.cpp +++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp @@ -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 diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index c970e2e14a3..60513959f82 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -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 diff --git a/lib/Analysis/DataStructure/DataStructureAA.cpp b/lib/Analysis/DataStructure/DataStructureAA.cpp index 4b55da7aa54..cbc13cec25f 100644 --- a/lib/Analysis/DataStructure/DataStructureAA.cpp +++ b/lib/Analysis/DataStructure/DataStructureAA.cpp @@ -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 diff --git a/lib/Analysis/DataStructure/DataStructureOpt.cpp b/lib/Analysis/DataStructure/DataStructureOpt.cpp index d037b52145e..b213ecd79b9 100644 --- a/lib/Analysis/DataStructure/DataStructureOpt.cpp +++ b/lib/Analysis/DataStructure/DataStructureOpt.cpp @@ -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 diff --git a/lib/Analysis/DataStructure/DataStructureStats.cpp b/lib/Analysis/DataStructure/DataStructureStats.cpp index 3659c906973..a48223e0edf 100644 --- a/lib/Analysis/DataStructure/DataStructureStats.cpp +++ b/lib/Analysis/DataStructure/DataStructureStats.cpp @@ -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 diff --git a/lib/Analysis/DataStructure/GraphChecker.cpp b/lib/Analysis/DataStructure/GraphChecker.cpp index 11ebc6920cb..6d78621c11c 100644 --- a/lib/Analysis/DataStructure/GraphChecker.cpp +++ b/lib/Analysis/DataStructure/GraphChecker.cpp @@ -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 diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 253cbf7a351..a7b2579612d 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -28,11 +28,12 @@ // #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 diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index d6f6c02cc21..ae528aeb345 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -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 diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp index d868d250f7b..27daa186d27 100644 --- a/lib/Analysis/DataStructure/Steensgaard.cpp +++ b/lib/Analysis/DataStructure/Steensgaard.cpp @@ -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 diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp index 696368a866e..6912af437b7 100644 --- a/lib/Analysis/DataStructure/TopDownClosure.cpp +++ b/lib/Analysis/DataStructure/TopDownClosure.cpp @@ -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 |