Skip to content

Commit c6d01ed

Browse files
committed
1 parent 39819cc commit c6d01ed

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

llvm/lib/TextAPI/MachO/InterfaceFile.cpp

+9-11
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
#include <iomanip>
1515
#include <sstream>
1616

17-
namespace llvm {
18-
namespace MachO {
19-
namespace detail {
17+
using namespace llvm;
18+
using namespace llvm::MachO;
19+
20+
namespace {
2021
template <typename C>
2122
typename C::iterator addEntry(C &Container, StringRef InstallName) {
2223
auto I = partition_point(Container, [=](const InterfaceFileRef &O) {
@@ -39,21 +40,21 @@ typename C::iterator addEntry(C &Container, const Target &Target_) {
3940

4041
return Container.insert(Iter, Target_);
4142
}
42-
} // end namespace detail.
43+
} // end namespace
4344

4445
void InterfaceFileRef::addTarget(const Target &Target) {
45-
detail::addEntry(Targets, Target);
46+
addEntry(Targets, Target);
4647
}
4748

4849
void InterfaceFile::addAllowableClient(StringRef InstallName,
4950
const Target &Target) {
50-
auto Client = detail::addEntry(AllowableClients, InstallName);
51+
auto Client = addEntry(AllowableClients, InstallName);
5152
Client->addTarget(Target);
5253
}
5354

5455
void InterfaceFile::addReexportedLibrary(StringRef InstallName,
5556
const Target &Target) {
56-
auto Lib = detail::addEntry(ReexportedLibraries, InstallName);
57+
auto Lib = addEntry(ReexportedLibraries, InstallName);
5758
Lib->addTarget(Target);
5859
}
5960

@@ -97,7 +98,7 @@ void InterfaceFile::addUUID(const Target &Target, uint8_t UUID[16]) {
9798
}
9899

99100
void InterfaceFile::addTarget(const Target &Target) {
100-
detail::addEntry(Targets, Target);
101+
addEntry(Targets, Target);
101102
}
102103

103104
InterfaceFile::const_filtered_target_range
@@ -118,6 +119,3 @@ void InterfaceFile::addSymbol(SymbolKind Kind, StringRef Name,
118119
for (const auto &Target : Targets)
119120
result.first->second->addTarget(Target);
120121
}
121-
122-
} // end namespace MachO.
123-
} // end namespace llvm.

llvm/lib/TextAPI/MachO/TextStub.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,8 @@ struct DocumentListTraits<std::vector<const MachO::InterfaceFile *>> {
10891089
};
10901090

10911091
} // end namespace yaml.
1092+
} // namespace llvm
10921093

1093-
namespace MachO {
10941094
static void DiagHandler(const SMDiagnostic &Diag, void *Context) {
10951095
auto *File = static_cast<TextAPIContext *>(Context);
10961096
SmallString<1024> Message;
@@ -1147,6 +1147,3 @@ Error TextAPIWriter::writeToStream(raw_ostream &OS, const InterfaceFile &File) {
11471147

11481148
return Error::success();
11491149
}
1150-
1151-
} // end namespace MachO.
1152-
} // end namespace llvm.

0 commit comments

Comments
 (0)