#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) {
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);
}
}
void InterfaceFile::addTarget(const Target &Target) {
- detail::addEntry(Targets, Target);
+ addEntry(Targets, Target);
}
InterfaceFile::const_filtered_target_range
for (const auto &Target : Targets)
result.first->second->addTarget(Target);
}
-
-} // end namespace MachO.
-} // end namespace llvm.
};
} // end namespace yaml.
+} // namespace llvm
-namespace MachO {
static void DiagHandler(const SMDiagnostic &Diag, void *Context) {
auto *File = static_cast<TextAPIContext *>(Context);
SmallString<1024> Message;
return Error::success();
}
-
-} // end namespace MachO.
-} // end namespace llvm.