Clean up the use of static and anonymous namespaces. This turned up
[oota-llvm.git] / lib / CodeGen / StrongPHIElimination.cpp
index a632da6de09c550a4e1b69d9c03fe3ad80703af8..79f8f507c686c0f18d3340f8e4caec64c8ab06ef 100644 (file)
@@ -140,12 +140,13 @@ namespace {
                       SmallPtrSet<MachineBasicBlock*, 16>& v);
     void mergeLiveIntervals(unsigned primary, unsigned secondary, unsigned VN);
   };
-
-  char StrongPHIElimination::ID = 0;
-  RegisterPass<StrongPHIElimination> X("strong-phi-node-elimination",
-                  "Eliminate PHI nodes for register allocation, intelligently");
 }
 
+char StrongPHIElimination::ID = 0;
+static RegisterPass<StrongPHIElimination>
+X("strong-phi-node-elimination",
+  "Eliminate PHI nodes for register allocation, intelligently");
+
 const PassInfo *llvm::StrongPHIEliminationID = X.getPassInfo();
 
 /// computeDFS - Computes the DFS-in and DFS-out numbers of the dominator tree
@@ -192,6 +193,8 @@ void StrongPHIElimination::computeDFS(MachineFunction& MF) {
   }
 }
 
+namespace {
+
 /// PreorderSorter - a helper class that is used to sort registers
 /// according to the preorder number of their defining blocks
 class PreorderSorter {
@@ -219,6 +222,8 @@ public:
   }
 };
 
+}
+
 /// computeDomForest - compute the subforest of the DomTree corresponding
 /// to the defining blocks of the registers in question
 std::vector<StrongPHIElimination::DomForestNode*>