[PATCH] D82432: [lld-macho] Use namespace qualifiers (macho::) instead of `namespace lld { namespace macho {`

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 13:02:17 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG18db086dca8d: [lld-macho] Use namespace qualifiers (macho::) instead of `namespace lld {… (authored by MaskRay).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82432/new/

https://reviews.llvm.org/D82432

Files:
  lld/MachO/ExportTrie.cpp
  lld/MachO/SyntheticSections.cpp


Index: lld/MachO/SyntheticSections.cpp
===================================================================
--- lld/MachO/SyntheticSections.cpp
+++ 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<SyntheticSection *> 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<SyntheticSection *> syntheticSections;
-
-} // namespace macho
-} // namespace lld
Index: lld/MachO/ExportTrie.cpp
===================================================================
--- lld/MachO/ExportTrie.cpp
+++ lld/MachO/ExportTrie.cpp
@@ -64,10 +64,7 @@
 
 } // 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.
@@ -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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82432.273135.patch
Type: text/x-patch
Size: 1601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200624/540d730a/attachment.bin>


More information about the llvm-commits mailing list