10#include "llvm/ADT/STLExtras.h"
11#include "llvm/ADT/SmallString.h"
12#include "llvm/Support/raw_ostream.h"
13#include "llvm/TextAPI/Platform.h"
38 const PlatformVersionSet &Platforms) {
39 std::string PlatformAsString;
40 raw_string_ostream Stream(PlatformAsString);
43 llvm::interleaveComma(
45 [&Stream](
const std::pair<PlatformType, VersionTuple> &PV) {
47 if (!PV.second.empty())
48 Stream << PV.second.getAsString();
58 case FileType::MachO_Bundle:
61 case FileType::MachO_DynamicLibrary:
64 case FileType::MachO_DynamicLibrary_Stub:
65 DB.
AddString(
"mach-o dynamic library stub");
67 case FileType::TBD_V1:
70 case FileType::TBD_V2:
73 case FileType::TBD_V3:
76 case FileType::TBD_V4:
79 case FileType::TBD_V5:
82 case FileType::Invalid:
86 llvm_unreachable(
"Unexpected file type for diagnostics.");
91 std::string VersionString;
92 raw_string_ostream OS(VersionString);
100 const StringMapEntry<ArchitectureSet> &LibAttr) {
101 std::string IFAsString;
102 raw_string_ostream OS(IFAsString);
104 OS << LibAttr.getKey() <<
" [ " << LibAttr.getValue() <<
" ]";
static const char * getPlatformName(Darwin::DarwinPlatformKind Platform, Darwin::DarwinEnvironmentKind Environment)
llvm::MachO::ArchitectureSet ArchitectureSet
llvm::MachO::PackedVersion PackedVersion
llvm::MachO::Architecture Architecture
llvm::MachO::FileType FileType
llvm::MachO::PlatformType PlatformType
A little helper class used to produce diagnostics.
void AddString(StringRef V) const
const DiagnosticBuilder & operator<<(const DiagnosticBuilder &DB, const Architecture &Arch)
Diagnostic wrappers for TextAPI types for error reporting.