Author: Raphael Isemann
Date: 2020-10-13T15:06:41+02:00
New Revision: f4f4d54ae0d8971e67fd64e10d700804105b720c

URL: 
https://github.com/llvm/llvm-project/commit/f4f4d54ae0d8971e67fd64e10d700804105b720c
DIFF: 
https://github.com/llvm/llvm-project/commit/f4f4d54ae0d8971e67fd64e10d700804105b720c.diff

LOG: [lldb] Fill Watch/AppleTV simulator gaps in PlatformDarwin

When running the test suite against the Watch/AppleTV simulator we currently 
hitting
the unimplemented parts of PlatformDarwin for the respective simulator 
platforms.

This just adds the respective switch cases.

This whole code path depends on having a valid Target, so can't just unittest 
this code
without refactoring it. So instead this is tested by just running the testsuite 
against
the respective simulators (which is how I found this).

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D89106

Added: 
    

Modified: 
    lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp 
b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index 4e2df72ee3a8..6f25128caf24 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -1325,6 +1325,12 @@ FileSpec 
PlatformDarwin::GetSDKDirectoryForModules(XcodeSDK::Type sdk_type) {
   case XcodeSDK::Type::iPhoneOS:
     sdks_spec.AppendPathComponent("iPhoneOS.platform");
     break;
+  case XcodeSDK::Type::WatchSimulator:
+    sdks_spec.AppendPathComponent("WatchSimulator.platform");
+    break;
+  case XcodeSDK::Type::AppleTVSimulator:
+    sdks_spec.AppendPathComponent("AppleTVSimulator.platform");
+    break;
   default:
     llvm_unreachable("unsupported sdk");
   }
@@ -1567,6 +1573,14 @@ void 
PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(
       minimum_version_option.PutCString("-mmacosx-version-min=");
       minimum_version_option.PutCString(version.getAsString());
       break;
+    case XcodeSDK::Type::WatchSimulator:
+      minimum_version_option.PutCString("-mwatchos-simulator-version-min=");
+      minimum_version_option.PutCString(version.getAsString());
+      break;
+    case XcodeSDK::Type::AppleTVSimulator:
+      minimum_version_option.PutCString("-mtvos-version-min=");
+      minimum_version_option.PutCString(version.getAsString());
+      break;
     default:
       llvm_unreachable("unsupported sdk");
     }


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to