diff options
author | Fangrui Song <maskray@google.com> | 2020-06-24 14:39:54 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-06-24 14:43:45 -0700 |
commit | c6d01ed0465c77090c816f37769643edce8e3501 (patch) | |
tree | ebabf905fb5f283375c8af409bed0c711bf448e7 /llvm/lib/TextAPI/MachO/InterfaceFile.cpp | |
parent | 39819ccd36b6dd61c9decd29df64fd4e8a7ee9ad (diff) | |
download | llvm-c6d01ed0465c77090c816f37769643edce8e3501.zip llvm-c6d01ed0465c77090c816f37769643edce8e3501.tar.gz llvm-c6d01ed0465c77090c816f37769643edce8e3501.tar.bz2 |
[TextAPI/MachO] Fix style issues. NFC
See https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions
Diffstat (limited to 'llvm/lib/TextAPI/MachO/InterfaceFile.cpp')
-rw-r--r-- | llvm/lib/TextAPI/MachO/InterfaceFile.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/llvm/lib/TextAPI/MachO/InterfaceFile.cpp b/llvm/lib/TextAPI/MachO/InterfaceFile.cpp index 0a392a2..64d2c3e 100644 --- a/llvm/lib/TextAPI/MachO/InterfaceFile.cpp +++ b/llvm/lib/TextAPI/MachO/InterfaceFile.cpp @@ -14,9 +14,10 @@ #include <iomanip> #include <sstream> -namespace llvm { -namespace MachO { -namespace detail { +using namespace llvm; +using namespace llvm::MachO; + +namespace { template <typename C> typename C::iterator addEntry(C &Container, StringRef InstallName) { auto I = partition_point(Container, [=](const InterfaceFileRef &O) { @@ -39,21 +40,21 @@ typename C::iterator addEntry(C &Container, const Target &Target_) { return Container.insert(Iter, Target_); } -} // end namespace detail. +} // end namespace void InterfaceFileRef::addTarget(const Target &Target) { - detail::addEntry(Targets, Target); + addEntry(Targets, Target); } void InterfaceFile::addAllowableClient(StringRef InstallName, const Target &Target) { - auto Client = detail::addEntry(AllowableClients, InstallName); + auto Client = addEntry(AllowableClients, InstallName); Client->addTarget(Target); } void InterfaceFile::addReexportedLibrary(StringRef InstallName, const Target &Target) { - auto Lib = detail::addEntry(ReexportedLibraries, InstallName); + auto Lib = addEntry(ReexportedLibraries, InstallName); Lib->addTarget(Target); } @@ -97,7 +98,7 @@ void InterfaceFile::addUUID(const Target &Target, uint8_t UUID[16]) { } void InterfaceFile::addTarget(const Target &Target) { - detail::addEntry(Targets, Target); + addEntry(Targets, Target); } InterfaceFile::const_filtered_target_range @@ -118,6 +119,3 @@ void InterfaceFile::addSymbol(SymbolKind Kind, StringRef Name, for (const auto &Target : Targets) result.first->second->addTarget(Target); } - -} // end namespace MachO. -} // end namespace llvm. |