diff --git a/lld/MachO/ExportTrie.cpp b/lld/MachO/ExportTrie.cpp --- a/lld/MachO/ExportTrie.cpp +++ b/lld/MachO/ExportTrie.cpp @@ -64,10 +64,7 @@ } // namespace -namespace lld { -namespace macho { - -struct TrieNode { +struct macho::TrieNode { std::vector edges; Optional info; // Estimated offset from the start of the serialized trie to the current node. @@ -277,13 +274,10 @@ } } -void parseTrie(const uint8_t *buf, size_t size, - const TrieEntryCallback &callback) { +void macho::parseTrie(const uint8_t *buf, size_t size, + const TrieEntryCallback &callback) { if (size == 0) return; TrieParser(buf, size, callback).parse(); } - -} // namespace macho -} // namespace lld diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp --- a/lld/MachO/SyntheticSections.cpp +++ b/lld/MachO/SyntheticSections.cpp @@ -25,9 +25,11 @@ using namespace llvm::MachO; using namespace llvm::support; using namespace llvm::support::endian; +using namespace lld; +using namespace lld::macho; -namespace lld { -namespace macho { +InStruct macho::in; +std::vector macho::syntheticSections; SyntheticSection::SyntheticSection(const char *segname, const char *name) : OutputSection(SyntheticKind, name), segname(segname) { @@ -345,9 +347,3 @@ off += str.size() + 1; // account for null terminator } } - -InStruct in; -std::vector syntheticSections; - -} // namespace macho -} // namespace lld