Namespacify.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 25 Nov 2010 16:42:51 +0000 (16:42 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 25 Nov 2010 16:42:51 +0000 (16:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120146 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocBasic.cpp
lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp

index 76c243c743ffc64a65eb102c4cf6f64f97b0763b..6af5e6c889655a744dac54ebd3eab9dafa25ed38 100644 (file)
@@ -56,6 +56,8 @@ static cl::opt<bool>
 VerifyRegAlloc("verify-regalloc",
                cl::desc("Verify live intervals before renaming"));
 
+namespace {
+
 class PhysicalRegisterDescription : public AbstractRegisterDescription {
   const TargetRegisterInfo *tri_;
 public:
@@ -63,8 +65,6 @@ public:
   virtual const char *getName(unsigned reg) const { return tri_->getName(reg); }
 };
 
-namespace {
-
 /// RABasic provides a minimal implementation of the basic register allocation
 /// algorithm. It prioritizes live virtual registers by spill weight and spills
 /// whenever a register is unavailable. This is not practical in production but
index c8037b3b6ad785927d061a22d33232f4b55879d8..c8db0c40476540b04e9d5aeed8871a1c2f525c0e 100644 (file)
@@ -222,7 +222,7 @@ void PPCInstPrinter::printMemRegReg(const MCInst *MI, unsigned OpNo,
 
 /// stripRegisterPrefix - This method strips the character prefix from a
 /// register name so that only the number is left.  Used by for linux asm.
-const char *stripRegisterPrefix(const char *RegName) {
+static const char *stripRegisterPrefix(const char *RegName) {
   switch (RegName[0]) {
   case 'r':
   case 'f':