Author: Vedant Kumar Date: 2020-02-10T10:06:40-08:00 New Revision: 936d1427da1432d724dfa5851097347bcdf7c521
URL: https://github.com/llvm/llvm-project/commit/936d1427da1432d724dfa5851097347bcdf7c521 DIFF: https://github.com/llvm/llvm-project/commit/936d1427da1432d724dfa5851097347bcdf7c521.diff LOG: [Host.mm] Check for the right macro instead of inlining it Differential Revision: https://reviews.llvm.org/D73938 Added: Modified: lldb/source/Host/macosx/objcxx/Host.mm Removed: ################################################################################ diff --git a/lldb/source/Host/macosx/objcxx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm index 233734109c41..8c22b57d09d8 100644 --- a/lldb/source/Host/macosx/objcxx/Host.mm +++ b/lldb/source/Host/macosx/objcxx/Host.mm @@ -9,9 +9,10 @@ #include "lldb/Host/Host.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 @@ -153,7 +154,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" @@ -307,11 +308,11 @@ repeat with the_window in (get windows)\n\ 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 @@ -404,7 +405,7 @@ repeat with the_window in (get windows)\n\ } return true; -#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__) +#endif // #if !NO_XPC_SERVICES } Environment Host::GetEnvironment() { return Environment(*_NSGetEnviron()); } @@ -1263,7 +1264,7 @@ static bool ShouldLaunchUsingXPC(ProcessLaunchInfo &launch_info) { } 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