[Lldb-commits] [lldb] 2ce6bc6 - [lldb] Fix check for TARGET_OS_IPHONE
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 25 13:24:47 PST 2022
Author: Jonas Devlieghere
Date: 2022-02-25T13:24:39-08:00
New Revision: 2ce6bc61e876f4e7918952a565488d737ce647f6
URL: https://github.com/llvm/llvm-project/commit/2ce6bc61e876f4e7918952a565488d737ce647f6
DIFF: https://github.com/llvm/llvm-project/commit/2ce6bc61e876f4e7918952a565488d737ce647f6.diff
LOG: [lldb] Fix check for TARGET_OS_IPHONE
Instead of checking whether TARGET_OS_IPHONE is set to 1, the current
code just check the existence of TARGET_OS_IPHONE, which either always
succeeds or always fails, depending on whether you have
TargetConditionals.h included.
Added:
Modified:
lldb/source/Interpreter/CommandInterpreter.cpp
Removed:
################################################################################
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index a50803df58e7c..8676371b963e4 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -84,6 +84,10 @@
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/ScopedPrinter.h"
+#if defined(__APPLE__)
+#include <TargetConditionals.h>
+#endif
+
using namespace lldb;
using namespace lldb_private;
@@ -434,7 +438,7 @@ void CommandInterpreter::Initialize() {
if (cmd_obj_sp) {
alias_arguments_vector_sp = std::make_shared<OptionArgVector>();
#if defined(__APPLE__)
-#if defined(TARGET_OS_IPHONE)
+#if TARGET_OS_IPHONE
AddAlias("r", cmd_obj_sp, "--");
AddAlias("run", cmd_obj_sp, "--");
#else
More information about the lldb-commits
mailing list