diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/TextAPI/MachO/TextStubCommon.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/TextAPI/MachO/TextStubCommon.cpp')
-rw-r--r-- | llvm/lib/TextAPI/MachO/TextStubCommon.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/llvm/lib/TextAPI/MachO/TextStubCommon.cpp b/llvm/lib/TextAPI/MachO/TextStubCommon.cpp index 183c5d5a93b03..4a82df6beac12 100644 --- a/llvm/lib/TextAPI/MachO/TextStubCommon.cpp +++ b/llvm/lib/TextAPI/MachO/TextStubCommon.cpp @@ -12,6 +12,7 @@ #include "TextStubCommon.h" #include "TextAPIContext.h" +#include "llvm/ADT/StringSwitch.h" using namespace llvm::MachO; @@ -62,18 +63,27 @@ void ScalarTraits<PlatformSet>::output(const PlatformSet &Values, void *IO, case PlatformKind::macOS: OS << "macosx"; break; + case PlatformKind::iOSSimulator: + LLVM_FALLTHROUGH; case PlatformKind::iOS: OS << "ios"; break; + case PlatformKind::watchOSSimulator: + LLVM_FALLTHROUGH; case PlatformKind::watchOS: OS << "watchos"; break; + case PlatformKind::tvOSSimulator: + LLVM_FALLTHROUGH; case PlatformKind::tvOS: OS << "tvos"; break; case PlatformKind::bridgeOS: OS << "bridgeos"; break; + case PlatformKind::macCatalyst: + OS << "iosmac"; + break; } } @@ -119,7 +129,7 @@ QuotingType ScalarTraits<PlatformSet>::mustQuote(StringRef) { void ScalarBitSetTraits<ArchitectureSet>::bitset(IO &IO, ArchitectureSet &Archs) { -#define ARCHINFO(arch, type, subtype) \ +#define ARCHINFO(arch, type, subtype, numbits) \ IO.bitSetCase(Archs, #arch, 1U << static_cast<int>(AK_##arch)); #include "llvm/TextAPI/MachO/Architecture.def" #undef ARCHINFO @@ -212,7 +222,7 @@ StringRef ScalarTraits<UUID>::input(StringRef Scalar, void *, UUID &Value) { auto UUID = Split.second.trim(); if (UUID.empty()) return "invalid uuid string pair"; - Value.second = UUID; + Value.second = std::string(UUID); Value.first = Target{getArchitectureFromName(Arch), PlatformKind::unknown}; return {}; } |