summaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/MachO/TextStubCommon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TextAPI/MachO/TextStubCommon.cpp')
-rw-r--r--llvm/lib/TextAPI/MachO/TextStubCommon.cpp14
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 {};
}