Skip to content

Commit 936d142

Browse files
committed
[Host.mm] Check for the right macro instead of inlining it
Differential Revision: https://reviews.llvm.org/D73938
1 parent 7af7b96 commit 936d142

File tree

1 file changed

+7
-6
lines changed
  • lldb/source/Host/macosx/objcxx

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
#include "lldb/Host/Host.h"
1010

1111
#include <AvailabilityMacros.h>
12+
#include <TargetConditionals.h>
1213

1314
// On device doesn't have supporty for XPC.
14-
#if defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__))
15+
#if defined(__APPLE__) && defined(TARGET_OS_EMBEDDED)
1516
#define NO_XPC_SERVICES 1
1617
#endif
1718

@@ -153,7 +154,7 @@
153154
return NULL;
154155
}
155156

156-
#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
157+
#if !NO_XPC_SERVICES
157158

158159
const char *applscript_in_new_tty = "tell application \"Terminal\"\n"
159160
" activate\n"
@@ -307,11 +308,11 @@ repeat with the_window in (get windows)\n\
307308
return error;
308309
}
309310

310-
#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
311+
#endif // #if !NO_XPC_SERVICES
311312

312313
bool Host::OpenFileInExternalEditor(const FileSpec &file_spec,
313314
uint32_t line_no) {
314-
#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
315+
#if NO_XPC_SERVICES
315316
return false;
316317
#else
317318
// We attach this to an 'odoc' event to specify a particular selection
@@ -404,7 +405,7 @@ repeat with the_window in (get windows)\n\
404405
}
405406

406407
return true;
407-
#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
408+
#endif // #if !NO_XPC_SERVICES
408409
}
409410

410411
Environment Host::GetEnvironment() { return Environment(*_NSGetEnviron()); }
@@ -1263,7 +1264,7 @@ static bool ShouldLaunchUsingXPC(ProcessLaunchInfo &launch_info) {
12631264
}
12641265

12651266
if (launch_info.GetFlags().Test(eLaunchFlagLaunchInTTY)) {
1266-
#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
1267+
#if !NO_XPC_SERVICES
12671268
return LaunchInNewTerminalWithAppleScript(exe_spec.GetPath().c_str(),
12681269
launch_info);
12691270
#else

0 commit comments

Comments
 (0)