vsk updated this revision to Diff 243608.
vsk retitled this revision from "[Host.mm] Check for the right macro instead of 
inlining it." to "[Host.mm] Check for the right macro instead of inlining it".
vsk added a comment.

- Check TARGET_OS_EMBEDDED.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73938/new/

https://reviews.llvm.org/D73938

Files:
  lldb/source/Host/macosx/objcxx/Host.mm


Index: lldb/source/Host/macosx/objcxx/Host.mm
===================================================================
--- lldb/source/Host/macosx/objcxx/Host.mm
+++ lldb/source/Host/macosx/objcxx/Host.mm
@@ -10,9 +10,10 @@
 #include "../PosixSpawnResponsible.h"
 
 #include <AvailabilityMacros.h>
+#include <TargetConditionals.h>
 
 // On device doesn't have supporty for XPC.
-#if defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__))
+#if defined(__APPLE__) && defined(TARGET_OS_EMBEDDED)
 #define NO_XPC_SERVICES 1
 #endif
 
@@ -156,7 +157,7 @@
   return NULL;
 }
 
-#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
+#if !NO_XPC_SERVICES
 
 const char *applscript_in_new_tty = "tell application \"Terminal\"\n"
                                     "   activate\n"
@@ -310,11 +311,11 @@
   return error;
 }
 
-#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
+#endif // #if !NO_XPC_SERVICES
 
 bool Host::OpenFileInExternalEditor(const FileSpec &file_spec,
                                     uint32_t line_no) {
-#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
+#if NO_XPC_SERVICES
   return false;
 #else
   // We attach this to an 'odoc' event to specify a particular selection
@@ -407,7 +408,7 @@
   }
 
   return true;
-#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
+#endif // #if !NO_XPC_SERVICES
 }
 
 Environment Host::GetEnvironment() { return Environment(*_NSGetEnviron()); }
@@ -1294,7 +1295,7 @@
   }
 
   if (launch_info.GetFlags().Test(eLaunchFlagLaunchInTTY)) {
-#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
+#if !NO_XPC_SERVICES
     return LaunchInNewTerminalWithAppleScript(exe_spec.GetPath().c_str(),
                                               launch_info);
 #else


Index: lldb/source/Host/macosx/objcxx/Host.mm
===================================================================
--- lldb/source/Host/macosx/objcxx/Host.mm
+++ lldb/source/Host/macosx/objcxx/Host.mm
@@ -10,9 +10,10 @@
 #include "../PosixSpawnResponsible.h"
 
 #include <AvailabilityMacros.h>
+#include <TargetConditionals.h>
 
 // On device doesn't have supporty for XPC.
-#if defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__))
+#if defined(__APPLE__) && defined(TARGET_OS_EMBEDDED)
 #define NO_XPC_SERVICES 1
 #endif
 
@@ -156,7 +157,7 @@
   return NULL;
 }
 
-#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
+#if !NO_XPC_SERVICES
 
 const char *applscript_in_new_tty = "tell application \"Terminal\"\n"
                                     "   activate\n"
@@ -310,11 +311,11 @@
   return error;
 }
 
-#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
+#endif // #if !NO_XPC_SERVICES
 
 bool Host::OpenFileInExternalEditor(const FileSpec &file_spec,
                                     uint32_t line_no) {
-#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
+#if NO_XPC_SERVICES
   return false;
 #else
   // We attach this to an 'odoc' event to specify a particular selection
@@ -407,7 +408,7 @@
   }
 
   return true;
-#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
+#endif // #if !NO_XPC_SERVICES
 }
 
 Environment Host::GetEnvironment() { return Environment(*_NSGetEnviron()); }
@@ -1294,7 +1295,7 @@
   }
 
   if (launch_info.GetFlags().Test(eLaunchFlagLaunchInTTY)) {
-#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
+#if !NO_XPC_SERVICES
     return LaunchInNewTerminalWithAppleScript(exe_spec.GetPath().c_str(),
                                               launch_info);
 #else
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to