See https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions
Similar to D79982.
Reviewed By: #lld-macho, int3
Differential Revision: https://reviews.llvm.org/D82432
} // namespace
-namespace lld {
-namespace macho {
-
-struct TrieNode {
+struct macho::TrieNode {
std::vector<Edge> edges;
Optional<ExportInfo> info;
// Estimated offset from the start of the serialized trie to the current node.
}
}
-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
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<SyntheticSection *> macho::syntheticSections;
SyntheticSection::SyntheticSection(const char *segname, const char *name)
: OutputSection(SyntheticKind, name), segname(segname) {
off += str.size() + 1; // account for null terminator
}
}
-
-InStruct in;
-std::vector<SyntheticSection *> syntheticSections;
-
-} // namespace macho
-} // namespace lld