[lld] r181473 - Use anonymous namespace for local classes. Patch by Rui Ueyama
Nick Kledzik
kledzik at apple.com
Wed May 8 14:34:12 PDT 2013
Author: kledzik
Date: Wed May 8 16:34:11 2013
New Revision: 181473
URL: http://llvm.org/viewvc/llvm-project?rev=181473&view=rev
Log:
Use anonymous namespace for local classes. Patch by Rui Ueyama
Modified:
lld/trunk/lib/Core/Resolver.cpp
Modified: lld/trunk/lib/Core/Resolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Resolver.cpp?rev=181473&r1=181472&r2=181473&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Wed May 8 16:34:11 2013
@@ -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() {
More information about the llvm-commits
mailing list