Move private classes into anonymous namespaces
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 23 Mar 2015 12:30:58 +0000 (12:30 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 23 Mar 2015 12:30:58 +0000 (12:30 +0000)
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232944 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveInterval.cpp
lib/CodeGen/RegisterPressure.cpp
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Support/GraphWriter.cpp
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp

index e1aee4d898a5ade5f7666f4ced106265b42a02eb..2afd7faaea942ff390095dca31ddc2fb11301787 100644 (file)
@@ -32,6 +32,7 @@
 #include <algorithm>
 using namespace llvm;
 
+namespace {
 //===----------------------------------------------------------------------===//
 // Implementation of various methods necessary for calculation of live ranges.
 // The implementation of the methods abstracts from the concrete type of the
@@ -293,6 +294,7 @@ private:
     return I;
   }
 };
+} // namespace
 
 //===----------------------------------------------------------------------===//
 //   LiveRange methods
index 9925efbff24b7e1937966eb9f06eaedf1d2201b0..36341039acf8ce0f5aaf8ddfe0dea725c63b28ba 100644 (file)
@@ -304,6 +304,7 @@ static bool containsReg(ArrayRef<unsigned> RegUnits, unsigned RegUnit) {
   return std::find(RegUnits.begin(), RegUnits.end(), RegUnit) != RegUnits.end();
 }
 
+namespace {
 /// Collect this instruction's unique uses and defs into SmallVectors for
 /// processing defs and uses in order.
 ///
@@ -354,6 +355,7 @@ protected:
     }
   }
 };
+} // namespace
 
 /// Collect physical and virtual register operands.
 static void collectOperands(const MachineInstr *MI,
index 702147155ba54512b50bfe10e4345905616da9a7..355547964163ef757883fbe57002e9ca05a3323c 100644 (file)
@@ -9984,6 +9984,7 @@ SDValue DAGCombiner::TransformFPLoadStorePair(SDNode *N) {
   return SDValue();
 }
 
+namespace {
 /// Helper struct to parse and store a memory address as base + index + offset.
 /// We ignore sign extensions when it is safe to do so.
 /// The following two expressions are not equivalent. To differentiate we need
@@ -10071,6 +10072,7 @@ struct BaseIndexOffset {
     return BaseIndexOffset(Base, Index, Off, IsIndexSignExt);
   }
 };
+} // namespace
 
 bool DAGCombiner::MergeStoresOfConstantsOrVecElts(
                   SmallVectorImpl<MemOpLink> &StoreNodes, EVT MemVT,
index 054df528474e8b442713b575a3d69c3e2c2fd77f..c0b5513d5a15721657c2dada8dadf962eeabd26e 100644 (file)
@@ -98,6 +98,7 @@ static bool ExecGraphViewer(StringRef ExecPath, std::vector<const char *> &args,
   return false;
 }
 
+namespace {
 struct GraphSession {
   std::string LogBuffer;
   bool TryFindProgram(StringRef Names, std::string &ProgramPath) {
@@ -114,6 +115,7 @@ struct GraphSession {
     return false;
   }
 };
+} // namespace
 
 static const char *getProgramName(GraphProgram::Name program) {
   switch (program) {
index 44d20fcfd845a138156d7809d520e75bfd893583..0a47dcb725ff62403ff3307f278d6394650136ee 100644 (file)
@@ -1143,6 +1143,7 @@ SDNode *AArch64DAGToDAGISel::SelectPostStore(SDNode *N, unsigned NumVecs,
   return St;
 }
 
+namespace {
 /// WidenVector - Given a value in the V64 register class, produce the
 /// equivalent value in the V128 register class.
 class WidenVector {
@@ -1163,6 +1164,7 @@ public:
     return DAG.getTargetInsertSubreg(AArch64::dsub, DL, WideTy, Undef, V64Reg);
   }
 };
+} // namespace
 
 /// NarrowVector - Given a value in the V128 register class, produce the
 /// equivalent value in the V64 register class.
index bf06be694dcda7fbfd9f204ffbc96e4364de2bd8..67330ae31bdfa9e0448911caf746a8a3769d6bb5 100644 (file)
@@ -259,6 +259,7 @@ static bool isLoadFromConstantInitializer(Value *V) {
   return false;
 }
 
+namespace {
 struct FindConstantPointers {
   bool LoadCanBeConstantFolded;
   bool IndexIsConstant;
@@ -541,6 +542,7 @@ public:
     return NumberOfOptimizedInstructions;
   }
 };
+} // namespace
 
 // Complete loop unrolling can make some loads constant, and we need to know if
 // that would expose any further optimization opportunities.