Skip to content

Commit 3ed88b0

Browse files
committed
[llvm][TextAPI/MachO] Support writing single macCatalyst platform
TAPI currently lacks a way to emit the macCatalyst platform. For TBD_V3 is does support zippered frameworks given that both macOS and macCatalyst are part of the PlatformSet. Differential revision: https://reviews.llvm.org/D73325
1 parent ce7ca2c commit 3ed88b0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/lib/TextAPI/MachO/TextStubCommon.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ void ScalarTraits<PlatformSet>::output(const PlatformSet &Values, void *IO,
7474
case PlatformKind::bridgeOS:
7575
OS << "bridgeos";
7676
break;
77+
case PlatformKind::macCatalyst:
78+
OS << "iosmac";
79+
break;
7780
}
7881
}
7982

llvm/unittests/TextAPI/TextStubV3Tests.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,11 @@ TEST(TBDv3, Platform_macCatalyst) {
329329
EXPECT_EQ(FileType::TBD_V3, File->getFileType());
330330
EXPECT_EQ(Platform, *File->getPlatforms().begin());
331331

332-
// It's not currently possible to emit the iomac platform. Enable this once
333-
// that's fixed.
334-
#if 0
335332
SmallString<4096> Buffer;
336333
raw_svector_ostream OS(Buffer);
337334
auto WriteResult = TextAPIWriter::writeToStream(OS, *File);
338335
EXPECT_TRUE(!WriteResult);
339336
EXPECT_EQ(stripWhitespace(tbd_v3_platform_iosmac), stripWhitespace(Buffer.c_str()));
340-
#endif
341337
}
342338

343339
TEST(TBDv3, Platform_zippered) {

0 commit comments

Comments
 (0)