From 3a223cd4f3adfebf6db7d7e680ff2da73d3ef5fb Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Fri, 2 Apr 2021 11:42:48 -0700 Subject: [PATCH] [TextAPI] run clang-format on violating sections, NFC --- .../llvm/TextAPI/MachO/InterfaceFile.h | 3 +- llvm/include/llvm/TextAPI/MachO/Symbol.h | 4 +- llvm/lib/TextAPI/MachO/InterfaceFile.cpp | 62 +++++++++---------- llvm/lib/TextAPI/MachO/TextStub.cpp | 2 +- 4 files changed, 35 insertions(+), 36 deletions(-) diff --git a/llvm/include/llvm/TextAPI/MachO/InterfaceFile.h b/llvm/include/llvm/TextAPI/MachO/InterfaceFile.h index 3aaf6e23b633..9dc120469141 100644 --- a/llvm/include/llvm/TextAPI/MachO/InterfaceFile.h +++ b/llvm/include/llvm/TextAPI/MachO/InterfaceFile.h @@ -290,7 +290,8 @@ public: /// that is being generated needs to match one of the allowable clients or the /// linker refuses to link this library. /// - /// \param InstallName The name of the client that is allowed to link this library. + /// \param InstallName The name of the client that is allowed to link this + /// library. /// \param Target The target triple for which this applies. void addAllowableClient(StringRef InstallName, const Target &Target); diff --git a/llvm/include/llvm/TextAPI/MachO/Symbol.h b/llvm/include/llvm/TextAPI/MachO/Symbol.h index 839945f10fa6..4f7fb2d483a5 100644 --- a/llvm/include/llvm/TextAPI/MachO/Symbol.h +++ b/llvm/include/llvm/TextAPI/MachO/Symbol.h @@ -109,9 +109,7 @@ public: (Flags == O.Flags); } - bool operator!=(const Symbol &O) const { - return !(*this == O); - } + bool operator!=(const Symbol &O) const { return !(*this == O); } private: StringRef Name; diff --git a/llvm/lib/TextAPI/MachO/InterfaceFile.cpp b/llvm/lib/TextAPI/MachO/InterfaceFile.cpp index 9e13a61fdf5f..ad6f1d3db057 100644 --- a/llvm/lib/TextAPI/MachO/InterfaceFile.cpp +++ b/llvm/lib/TextAPI/MachO/InterfaceFile.cpp @@ -129,35 +129,35 @@ void InterfaceFile::addDocument(std::shared_ptr &&Document) { } bool InterfaceFile::operator==(const InterfaceFile &O) const { - if (Targets != O.Targets) - return false; - if (InstallName != O.InstallName) - return false; - if ((CurrentVersion != O.CurrentVersion) || - (CompatibilityVersion != O.CompatibilityVersion)) - return false; - if (SwiftABIVersion != O.SwiftABIVersion) - return false; - if (IsTwoLevelNamespace != O.IsTwoLevelNamespace) - return false; - if (IsAppExtensionSafe != O.IsAppExtensionSafe) - return false; - if (IsInstallAPI != O.IsInstallAPI) - return false; - if (ParentUmbrellas != O.ParentUmbrellas) - return false; - if (AllowableClients != O.AllowableClients) - return false; - if (ReexportedLibraries != O.ReexportedLibraries) - return false; - if (Symbols != O.Symbols) - return false; - if (!std::equal(Documents.begin(), Documents.end(), O.Documents.begin(), - O.Documents.end(), - [](const std::shared_ptr LHS, - const std::shared_ptr RHS) { - return *LHS == *RHS; - })) - return false; - return true; + if (Targets != O.Targets) + return false; + if (InstallName != O.InstallName) + return false; + if ((CurrentVersion != O.CurrentVersion) || + (CompatibilityVersion != O.CompatibilityVersion)) + return false; + if (SwiftABIVersion != O.SwiftABIVersion) + return false; + if (IsTwoLevelNamespace != O.IsTwoLevelNamespace) + return false; + if (IsAppExtensionSafe != O.IsAppExtensionSafe) + return false; + if (IsInstallAPI != O.IsInstallAPI) + return false; + if (ParentUmbrellas != O.ParentUmbrellas) + return false; + if (AllowableClients != O.AllowableClients) + return false; + if (ReexportedLibraries != O.ReexportedLibraries) + return false; + if (Symbols != O.Symbols) + return false; + if (!std::equal(Documents.begin(), Documents.end(), O.Documents.begin(), + O.Documents.end(), + [](const std::shared_ptr LHS, + const std::shared_ptr RHS) { + return *LHS == *RHS; + })) + return false; + return true; } diff --git a/llvm/lib/TextAPI/MachO/TextStub.cpp b/llvm/lib/TextAPI/MachO/TextStub.cpp index 1d6352b2e126..68c0d6b25006 100644 --- a/llvm/lib/TextAPI/MachO/TextStub.cpp +++ b/llvm/lib/TextAPI/MachO/TextStub.cpp @@ -593,7 +593,7 @@ template <> struct MappingTraits { // platforms, specifically to filter out the i386 slice from // platform macCatalyst. TargetList synthesizeTargets(ArchitectureSet Architectures, - const PlatformSet &Platforms) { + const PlatformSet &Platforms) { TargetList Targets; for (auto Platform : Platforms) {