From a147660147bb4f60cdf7a05218b212196ecc278e Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 16 Nov 2015 09:01:28 +0000 Subject: [PATCH] Move helper classes into anonymous namespaces. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253189 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ScalarEvolution.cpp | 4 ++++ lib/Transforms/IPO/MergeFunctions.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index c2db02fe85a..5f927121fc2 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -3626,6 +3626,7 @@ ScalarEvolution::ForgetSymbolicName(Instruction *PN, const SCEV *SymName) { } } +namespace { class SCEVInitRewriter : public SCEVRewriteVisitor { 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 { 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) { diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp index bb75ab6ece1..fb37bcd42ed 100644 --- a/lib/Transforms/IPO/MergeFunctions.cpp +++ b/lib/Transforms/IPO/MergeFunctions.cpp @@ -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 -- 2.34.1