From 85c824f131e92aac16fc0e29ec60cc3ccfe6e286 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 5 Feb 2016 13:50:53 +0000 Subject: [PATCH] Move classes defined in a cpp file into an anonymous namespace. No functionality change intended. llvm-svn: 259883 --- llvm/lib/ProfileData/CoverageMappingReader.cpp | 2 ++ llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/llvm/lib/ProfileData/CoverageMappingReader.cpp b/llvm/lib/ProfileData/CoverageMappingReader.cpp index fa4d6d66d730..633de3202c2d 100644 --- a/llvm/lib/ProfileData/CoverageMappingReader.cpp +++ b/llvm/lib/ProfileData/CoverageMappingReader.cpp @@ -306,6 +306,7 @@ StringRef InstrProfSymtab::getFuncName(uint64_t Pointer, size_t Size) { return Data.substr(Pointer - Address, Size); } +namespace { struct CovMapFuncRecordReader { // The interface to read coverage mapping function records for // a module. \p Buf is a reference to the buffer pointer pointing @@ -413,6 +414,7 @@ public: return std::error_code(); } }; +} // end anonymous namespace template std::unique_ptr CovMapFuncRecordReader::get( diff --git a/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp b/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp index 9a935ca53f4a..cefae0229e2b 100644 --- a/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp +++ b/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp @@ -71,6 +71,7 @@ INITIALIZE_PASS_DEPENDENCY(MachineDominanceFrontier) INITIALIZE_PASS_END(HexagonRDFOpt, "rdfopt", "Hexagon RDF opt", false, false) +namespace { struct HexagonCP : public CopyPropagation { HexagonCP(DataFlowGraph &G) : CopyPropagation(G) {} bool interpretAsCopy(const MachineInstr *MI, EqualityMap &EM) override; @@ -85,6 +86,7 @@ struct HexagonDCE : public DeadCodeElimination { bool run(); }; +} // end anonymous namespace bool HexagonCP::interpretAsCopy(const MachineInstr *MI, EqualityMap &EM) {