[llvm] 06fea93 - [TextAPI] add missing platforms for translating triples to tapi targets
Cyndy Ishida via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 09:36:48 PST 2024
Author: Cyndy Ishida
Date: 2024-03-05T09:34:44-08:00
New Revision: 06fea93341ae7d0d0faa82c4c8704591963c2d8c
URL: https://github.com/llvm/llvm-project/commit/06fea93341ae7d0d0faa82c4c8704591963c2d8c
DIFF: https://github.com/llvm/llvm-project/commit/06fea93341ae7d0d0faa82c4c8704591963c2d8c.diff
LOG: [TextAPI] add missing platforms for translating triples to tapi targets
Added:
Modified:
llvm/lib/TextAPI/Platform.cpp
Removed:
################################################################################
diff --git a/llvm/lib/TextAPI/Platform.cpp b/llvm/lib/TextAPI/Platform.cpp
index e891594300c2e4..d7d391102ce69a 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;
}
}
More information about the llvm-commits
mailing list