Move helper classes into anonymous namespaces. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 16 Nov 2015 09:01:28 +0000 (09:01 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 16 Nov 2015 09:01:28 +0000 (09:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253189 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp
lib/Transforms/IPO/MergeFunctions.cpp

index c2db02fe85a49aaa5cfef7ed849a84e30f9dbdfb..5f927121fc29ae191e4734463c3e951330198267 100644 (file)
@@ -3626,6 +3626,7 @@ ScalarEvolution::ForgetSymbolicName(Instruction *PN, const SCEV *SymName) {
   }
 }
 
+namespace {
 class SCEVInitRewriter : public SCEVRewriteVisitor<SCEVInitRewriter> {
 public:
   static const SCEV *rewrite(const SCEV *Scev, const Loop *L,
@@ -3690,6 +3691,7 @@ private:
   const Loop *L;
   bool Valid;
 };
+} // end anonymous namespace
 
 const SCEV *ScalarEvolution::createAddRecFromPHI(PHINode *PN) {
   const Loop *L = LI.getLoopFor(PN->getParent());
@@ -9614,6 +9616,7 @@ ScalarEvolution::getEqualPredicate(const SCEVUnknown *LHS,
   return Eq;
 }
 
+namespace {
 class SCEVPredicateRewriter : public SCEVRewriteVisitor<SCEVPredicateRewriter> {
 public:
   static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE,
@@ -9638,6 +9641,7 @@ public:
 private:
   SCEVUnionPredicate &P;
 };
+} // end anonymous namespace
 
 const SCEV *ScalarEvolution::rewriteUsingPredicate(const SCEV *Scev,
                                                    SCEVUnionPredicate &Preds) {
index bb75ab6ece16aa0b3c3e94025dc8e0d949a65b61..fb37bcd42edbf9e74bf2cb39fee24027d4668be5 100644 (file)
@@ -1249,6 +1249,7 @@ int FunctionComparator::compare() {
   return 0;
 }
 
+namespace {
 // Accumulate the hash of a sequence of 64-bit integers. This is similar to a
 // hash of a sequence of 64bit ints, but the entire input does not need to be
 // available at once. This interface is necessary for functionHash because it
@@ -1267,6 +1268,7 @@ public:
   // No finishing is required, because the entire hash value is used.
   uint64_t getHash() { return Hash; }
 };
+} // end anonymous namespace
 
 // A function hash is calculated by considering only the number of arguments and
 // whether a function is varargs, the order of basic blocks (given by the