Fix a bunch of namespace pollution.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78363 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/VirtRegRewriter.cpp b/lib/CodeGen/VirtRegRewriter.cpp
index 460b508..b34d43a 100644
--- a/lib/CodeGen/VirtRegRewriter.cpp
+++ b/lib/CodeGen/VirtRegRewriter.cpp
@@ -48,13 +48,14 @@
                        clEnumValEnd),
             cl::init(local));
 
-cl::opt<bool>
+static cl::opt<bool>
 ScheduleSpills("schedule-spills",
                cl::desc("Schedule spill code"),
                cl::init(false));
 
 VirtRegRewriter::~VirtRegRewriter() {}
 
+namespace {
 
 /// This class is intended for use with the new spilling framework only. It
 /// rewrites vreg def/uses to use the assigned preg, but does not insert any
@@ -101,8 +102,12 @@
 
 };
 
+}
+
 // ************************************************************************ //
 
+namespace {
+
 /// AvailableSpills - As the local rewriter is scanning and rewriting an MBB
 /// from top down, keep track of which spill slots or remat are available in
 /// each register.
@@ -225,6 +230,8 @@
                                 std::vector<MachineOperand*> &KillOps);
 };
 
+}
+
 // ************************************************************************ //
 
 // Given a location where a reload of a spilled register or a remat of
@@ -296,7 +303,9 @@
 
   return NewInsertLoc;
 }
- 
+
+namespace {
+
 // ReusedOp - For each reused operand, we keep track of a bit of information,
 // in case we need to rollback upon processing a new operand.  See comments
 // below.
@@ -396,6 +405,7 @@
   }
 };
 
+}
 
 // ****************** //
 // Utility Functions  //
@@ -962,6 +972,8 @@
 // Local Spiller Implementation  //
 // ***************************** //
 
+namespace {
+
 class VISIBILITY_HIDDEN LocalRewriter : public VirtRegRewriter {
   MachineRegisterInfo *RegInfo;
   const TargetRegisterInfo *TRI;
@@ -2320,6 +2332,8 @@
 
 };
 
+}
+
 llvm::VirtRegRewriter* llvm::createVirtRegRewriter() {
   switch (RewriterOpt) {
   default: llvm_unreachable("Unreachable!");