[lld] 28a2102 - [lld-macho][nfc] Remove unnecessary llvm:: namespace prefixes

Jez Ng via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 11 15:39:17 PDT 2021


Author: Jez Ng
Date: 2021-07-11T18:36:53-04:00
New Revision: 28a2102ee377a8bbcf3656fae87a74fd50101aa4

URL: https://github.com/llvm/llvm-project/commit/28a2102ee377a8bbcf3656fae87a74fd50101aa4
DIFF: https://github.com/llvm/llvm-project/commit/28a2102ee377a8bbcf3656fae87a74fd50101aa4.diff

LOG: [lld-macho][nfc] Remove unnecessary llvm:: namespace prefixes

Added: 
    

Modified: 
    lld/MachO/Driver.cpp
    lld/MachO/DriverUtils.cpp
    lld/MachO/UnwindInfoSection.cpp
    lld/MachO/Writer.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index 6737ad1b57f43..446bd7a531619 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -914,7 +914,7 @@ bool SymbolPatterns::matchLiteral(StringRef symbolName) const {
 }
 
 bool SymbolPatterns::matchGlob(StringRef symbolName) const {
-  for (const llvm::GlobPattern &glob : globs)
+  for (const GlobPattern &glob : globs)
     if (glob.match(symbolName))
       return true;
   return false;

diff  --git a/lld/MachO/DriverUtils.cpp b/lld/MachO/DriverUtils.cpp
index 33c235ba2ece6..5f46812e0c1f6 100644
--- a/lld/MachO/DriverUtils.cpp
+++ b/lld/MachO/DriverUtils.cpp
@@ -329,14 +329,14 @@ macho::DependencyTracker::DependencyTracker(StringRef path)
   }
 }
 
-void macho::DependencyTracker::write(llvm::StringRef version,
-                                     const llvm::SetVector<InputFile *> &inputs,
-                                     llvm::StringRef output) {
+void macho::DependencyTracker::write(StringRef version,
+                                     const SetVector<InputFile *> &inputs,
+                                     StringRef output) {
   if (!active)
     return;
 
   std::error_code ec;
-  llvm::raw_fd_ostream os(path, ec, llvm::sys::fs::OF_None);
+  raw_fd_ostream os(path, ec, fs::OF_None);
   if (ec) {
     warn("Error writing dependency info to file");
     return;

diff  --git a/lld/MachO/UnwindInfoSection.cpp b/lld/MachO/UnwindInfoSection.cpp
index 81a5064558aaa..ea94c8dea9ac3 100644
--- a/lld/MachO/UnwindInfoSection.cpp
+++ b/lld/MachO/UnwindInfoSection.cpp
@@ -92,7 +92,7 @@ using namespace lld::macho;
 // TODO(gkm): prune __eh_frame entries superseded by __unwind_info, PR50410
 // TODO(gkm): how do we align the 2nd-level pages?
 
-using EncodingMap = llvm::DenseMap<compact_unwind_encoding_t, size_t>;
+using EncodingMap = DenseMap<compact_unwind_encoding_t, size_t>;
 
 struct SecondLevelPage {
   uint32_t kind;
@@ -121,7 +121,7 @@ class UnwindInfoSectionImpl final : public UnwindInfoSection {
   std::vector<unwind_info_section_header_lsda_index_entry> lsdaEntries;
   // Map of function offset (from the image base) to an index within the LSDA
   // array.
-  llvm::DenseMap<uint32_t, uint32_t> functionToLsdaIndex;
+  DenseMap<uint32_t, uint32_t> functionToLsdaIndex;
   std::vector<CompactUnwindEntry<Ptr>> cuVector;
   std::vector<CompactUnwindEntry<Ptr> *> cuPtrVector;
   std::vector<SecondLevelPage> secondLevelPages;

diff  --git a/lld/MachO/Writer.cpp b/lld/MachO/Writer.cpp
index a6e1b8be65792..f311a64bc1fa2 100644
--- a/lld/MachO/Writer.cpp
+++ b/lld/MachO/Writer.cpp
@@ -467,7 +467,7 @@ class LCBuildVersion final : public LoadCommand {
     c->ntools = ntools;
     auto *t = reinterpret_cast<build_tool_version *>(&c[1]);
     t->tool = TOOL_LD;
-    t->version = encodeVersion(llvm::VersionTuple(
+    t->version = encodeVersion(VersionTuple(
         LLVM_VERSION_MAJOR, LLVM_VERSION_MINOR, LLVM_VERSION_PATCH));
   }
 
@@ -666,14 +666,14 @@ void Writer::scanSymbols() {
 
 // TODO: ld64 enforces the old load commands in a few other cases.
 static bool useLCBuildVersion(const PlatformInfo &platformInfo) {
-  static const std::vector<std::pair<PlatformKind, llvm::VersionTuple>>
-      minVersion = {{PlatformKind::macOS, llvm::VersionTuple(10, 14)},
-                    {PlatformKind::iOS, llvm::VersionTuple(12, 0)},
-                    {PlatformKind::iOSSimulator, llvm::VersionTuple(13, 0)},
-                    {PlatformKind::tvOS, llvm::VersionTuple(12, 0)},
-                    {PlatformKind::tvOSSimulator, llvm::VersionTuple(13, 0)},
-                    {PlatformKind::watchOS, llvm::VersionTuple(5, 0)},
-                    {PlatformKind::watchOSSimulator, llvm::VersionTuple(6, 0)}};
+  static const std::vector<std::pair<PlatformKind, VersionTuple>> minVersion = {
+      {PlatformKind::macOS, VersionTuple(10, 14)},
+      {PlatformKind::iOS, VersionTuple(12, 0)},
+      {PlatformKind::iOSSimulator, VersionTuple(13, 0)},
+      {PlatformKind::tvOS, VersionTuple(12, 0)},
+      {PlatformKind::tvOSSimulator, VersionTuple(13, 0)},
+      {PlatformKind::watchOS, VersionTuple(5, 0)},
+      {PlatformKind::watchOSSimulator, VersionTuple(6, 0)}};
   auto it = llvm::find_if(minVersion, [&](const auto &p) {
     return p.first == platformInfo.target.Platform;
   });


        


More information about the llvm-commits mailing list