diff options
author | Cyndy Ishida <cyndy_ishida@apple.com> | 2024-03-05 09:33:59 -0800 |
---|---|---|
committer | Cyndy Ishida <cyndy_ishida@apple.com> | 2024-03-05 09:34:44 -0800 |
commit | 06fea93341ae7d0d0faa82c4c8704591963c2d8c (patch) | |
tree | ed4ed95dbbb34de1b7b3b660789fe641d74173c3 | |
parent | 643b31dbe8a515e007a0f1b2e1072c34e461b778 (diff) | |
download | llvm-06fea93341ae7d0d0faa82c4c8704591963c2d8c.zip llvm-06fea93341ae7d0d0faa82c4c8704591963c2d8c.tar.gz llvm-06fea93341ae7d0d0faa82c4c8704591963c2d8c.tar.bz2 |
[TextAPI] add missing platforms for translating triples to tapi targets
-rw-r--r-- | llvm/lib/TextAPI/Platform.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/TextAPI/Platform.cpp b/llvm/lib/TextAPI/Platform.cpp index e891594..d7d3911 100644 --- a/llvm/lib/TextAPI/Platform.cpp +++ b/llvm/lib/TextAPI/Platform.cpp @@ -49,7 +49,13 @@ PlatformType mapToPlatformType(const Triple &Target) { case Triple::WatchOS: return Target.isSimulatorEnvironment() ? PLATFORM_WATCHOSSIMULATOR : PLATFORM_WATCHOS; - // TODO: add bridgeOS & driverKit once in llvm::Triple + case Triple::BridgeOS: + return PLATFORM_BRIDGEOS; + case Triple::DriverKit: + return PLATFORM_DRIVERKIT; + case Triple::XROS: + return Target.isSimulatorEnvironment() ? PLATFORM_XROS_SIMULATOR + : PLATFORM_XROS; } } |