From 80d8308b5707b92626ef6f7adda976327507adaa Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Wed, 8 May 2013 21:34:11 +0000 Subject: Use anonymous namespace for local classes. Patch by Rui Ueyama llvm-svn: 181473 --- lld/lib/Core/Resolver.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lld/lib/Core/Resolver.cpp') diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp index 8e94929340f..c8d80343fd1 100644 --- a/lld/lib/Core/Resolver.cpp +++ b/lld/lib/Core/Resolver.cpp @@ -27,10 +27,12 @@ namespace lld { +namespace { + /// This is used as a filter function to std::remove_if to dead strip atoms. class NotLive { public: - NotLive(const llvm::DenseSet& la) : _liveAtoms(la) { } + explicit NotLive(const llvm::DenseSet& la) : _liveAtoms(la) { } bool operator()(const Atom *atom) const { // don't remove if live @@ -53,7 +55,7 @@ private: /// This is used as a filter function to std::remove_if to coalesced atoms. class AtomCoalescedAway { public: - AtomCoalescedAway(SymbolTable &sym) : _symbolTable(sym) {} + explicit AtomCoalescedAway(SymbolTable &sym) : _symbolTable(sym) {} bool operator()(const Atom *atom) const { const Atom *rep = _symbolTable.replacement(atom); @@ -64,6 +66,8 @@ private: SymbolTable &_symbolTable; }; +} // namespace + // add all atoms from all initial .o files void Resolver::buildInitialAtomList() { -- cgit v1.2.3