================
@@ -1997,6 +2041,49 @@ struct DarwinPlatform {
     llvm_unreachable("Unknown DarwinEnvironmentKind enum");
   }
 
+  static std::string
+  getDisplayNameString(DarwinPlatformKind TargetPlatform,
+                       DarwinEnvironmentKind TargetEnvironment,
+                       VersionTuple Version) {
+    SmallVector<StringRef, 3> Components;
+    switch (TargetPlatform) {
+    case DarwinPlatformKind::MacOS:
+      Components.push_back("macOS");
+      break;
+    case DarwinPlatformKind::IPhoneOS:
+      Components.push_back("iOS");
+      break;
+    case DarwinPlatformKind::TvOS:
+      Components.push_back("tvOS");
+      break;
+    case DarwinPlatformKind::WatchOS:
+      Components.push_back("watchOS");
+      break;
+    case DarwinPlatformKind::DriverKit:
+      Components.push_back("DriverKit");
+      break;
+    default:
+      llvm::reportFatalUsageError(
+          Twine("Getting a display name string to infer SDK Info for "
----------------
cyndyishida wrote:

I find this string a bit hard to parse. Maybe 

`"Platform: ' + std::to_string(TargetPlatform) + "' is unsupported when 
inferring SDK Info."`


https://github.com/llvm/llvm-project/pull/176541
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to