[lld] 11a0d23 - [lld-macho][nfc] clang-format

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


Author: Jez Ng
Date: 2021-07-11T18:36:59-04:00
New Revision: 11a0d236503b9ed53a3b216181344a55a0212f95

URL: https://github.com/llvm/llvm-project/commit/11a0d236503b9ed53a3b216181344a55a0212f95
DIFF: https://github.com/llvm/llvm-project/commit/11a0d236503b9ed53a3b216181344a55a0212f95.diff

LOG: [lld-macho][nfc] clang-format

Added: 
    

Modified: 
    lld/MachO/Driver.cpp
    lld/MachO/InputFiles.cpp
    lld/MachO/InputFiles.h

Removed: 
    


################################################################################
diff  --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index 446bd7a531619..98340088a120c 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -240,8 +240,7 @@ static std::vector<ArchiveMember> getArchiveMembers(MemoryBufferRef mb) {
 static DenseMap<StringRef, ArchiveFile *> loadedArchives;
 
 static InputFile *addFile(StringRef path, bool forceLoadArchive,
-                          bool isExplicit = true,
-                          bool isBundleLoader = false) {
+                          bool isExplicit = true, bool isBundleLoader = false) {
   Optional<MemoryBufferRef> buffer = readFile(path);
   if (!buffer)
     return nullptr;
@@ -308,7 +307,7 @@ static InputFile *addFile(StringRef path, bool forceLoadArchive,
   case file_magic::macho_dynamically_linked_shared_lib:
   case file_magic::macho_dynamically_linked_shared_lib_stub:
   case file_magic::tapi_file:
-    if (DylibFile * dylibFile = loadDylib(mbref)) {
+    if (DylibFile *dylibFile = loadDylib(mbref)) {
       if (isExplicit)
         dylibFile->explicitlyLinked = true;
       newFile = dylibFile;

diff  --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp
index 523125ccb97d9..89f768a61e663 100644
--- a/lld/MachO/InputFiles.cpp
+++ b/lld/MachO/InputFiles.cpp
@@ -547,11 +547,10 @@ template <class NList>
 static macho::Symbol *createAbsolute(const NList &sym, InputFile *file,
                                      StringRef name) {
   if (sym.n_type & N_EXT) {
-    return symtab->addDefined(name, file, nullptr, sym.n_value, /*size=*/0,
-                              /*isWeakDef=*/false, sym.n_type & N_PEXT,
-                              sym.n_desc & N_ARM_THUMB_DEF,
-                              /*isReferencedDynamically=*/false,
-                              sym.n_desc & N_NO_DEAD_STRIP);
+    return symtab->addDefined(
+        name, file, nullptr, sym.n_value, /*size=*/0,
+        /*isWeakDef=*/false, sym.n_type & N_PEXT, sym.n_desc & N_ARM_THUMB_DEF,
+        /*isReferencedDynamically=*/false, sym.n_desc & N_NO_DEAD_STRIP);
   }
   return make<Defined>(name, file, nullptr, sym.n_value, /*size=*/0,
                        /*isWeakDef=*/false,

diff  --git a/lld/MachO/InputFiles.h b/lld/MachO/InputFiles.h
index c57f24ae2cc19..df8e006a5ccd0 100644
--- a/lld/MachO/InputFiles.h
+++ b/lld/MachO/InputFiles.h
@@ -165,9 +165,7 @@ class DylibFile final : public InputFile {
 
   unsigned numReferencedSymbols = 0;
 
-  bool isReferenced() const {
-    return numReferencedSymbols > 0;
-  }
+  bool isReferenced() const { return numReferencedSymbols > 0; }
 
   // An executable can be used as a bundle loader that will load the output
   // file being linked, and that contains symbols referenced, but not


        


More information about the llvm-commits mailing list