Use anonymous namespace for local classes. Patch by Rui Ueyama

llvm-svn: 181473
This commit is contained in:
Nick Kledzik 2013-05-08 21:34:11 +00:00
parent b7d6e2a4e0
commit 80d8308b57
1 changed files with 6 additions and 2 deletions

View File

@ -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<const Atom*>& la) : _liveAtoms(la) { }
explicit NotLive(const llvm::DenseSet<const Atom*>& 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() {