aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/TextStubCommon.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-07-26 19:03:47 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-07-26 19:04:23 +0000
commit7fa27ce4a07f19b07799a767fc29416f3b625afb (patch)
tree27825c83636c4de341eb09a74f49f5d38a15d165 /llvm/lib/TextAPI/TextStubCommon.cpp
parente3b557809604d036af6e00c60f012c2025b59a5e (diff)
Diffstat (limited to 'llvm/lib/TextAPI/TextStubCommon.cpp')
-rw-r--r--llvm/lib/TextAPI/TextStubCommon.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/llvm/lib/TextAPI/TextStubCommon.cpp b/llvm/lib/TextAPI/TextStubCommon.cpp
index 01a90078e150..0b710b0790b3 100644
--- a/llvm/lib/TextAPI/TextStubCommon.cpp
+++ b/llvm/lib/TextAPI/TextStubCommon.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
//
-// Implememts common Text Stub YAML mappings.
+// Implements common Text Stub YAML mappings.
//
//===----------------------------------------------------------------------===//
@@ -82,7 +82,7 @@ void ScalarTraits<PlatformSet>::output(const PlatformSet &Values, void *IO,
OS << "bridgeos";
break;
case PLATFORM_MACCATALYST:
- OS << "iosmac";
+ OS << "maccatalyst";
break;
case PLATFORM_DRIVERKIT:
OS << "driverkit";
@@ -112,6 +112,7 @@ StringRef ScalarTraits<PlatformSet>::input(StringRef Scalar, void *IO,
.Case("tvos", PLATFORM_TVOS)
.Case("bridgeos", PLATFORM_BRIDGEOS)
.Case("iosmac", PLATFORM_MACCATALYST)
+ .Case("maccatalyst", PLATFORM_MACCATALYST)
.Case("driverkit", PLATFORM_DRIVERKIT)
.Default(PLATFORM_UNKNOWN);
@@ -216,17 +217,10 @@ QuotingType ScalarTraits<SwiftVersion>::mustQuote(StringRef) {
return QuotingType::None;
}
-void ScalarTraits<UUID>::output(const UUID &Value, void *, raw_ostream &OS) {
- OS << Value.first << ": " << Value.second;
-}
+void ScalarTraits<UUID>::output(const UUID &Value, void *, raw_ostream &OS) {}
+
StringRef ScalarTraits<UUID>::input(StringRef Scalar, void *, UUID &Value) {
- auto Split = Scalar.split(':');
- auto Arch = Split.first.trim();
- auto UUID = Split.second.trim();
- if (UUID.empty())
- return "invalid uuid string pair";
- Value.second = std::string(UUID);
- Value.first = Target{getArchitectureFromName(Arch), PLATFORM_UNKNOWN};
+ Value = {};
return {};
}