From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/lib/TextAPI/MachO/TextStubCommon.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'llvm/lib/TextAPI/MachO/TextStubCommon.cpp') diff --git a/llvm/lib/TextAPI/MachO/TextStubCommon.cpp b/llvm/lib/TextAPI/MachO/TextStubCommon.cpp index 183c5d5a93b0..4a82df6beac1 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::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::mustQuote(StringRef) { void ScalarBitSetTraits::bitset(IO &IO, ArchitectureSet &Archs) { -#define ARCHINFO(arch, type, subtype) \ +#define ARCHINFO(arch, type, subtype, numbits) \ IO.bitSetCase(Archs, #arch, 1U << static_cast(AK_##arch)); #include "llvm/TextAPI/MachO/Architecture.def" #undef ARCHINFO @@ -212,7 +222,7 @@ StringRef ScalarTraits::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 {}; } -- cgit v1.2.3