summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-12-12 09:22:34 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2019-12-12 09:23:06 -0800
commit62456e579eebe012e5a6ebcf9960aef9d7babf87 (patch)
tree7b004c3d296986f9d8734dbd27ecab558f9362c9 /lldb/source
parentbd12a322d7e0b2541880c00f5551e047e06be982 (diff)
downloadbcm5719-llvm-62456e579eebe012e5a6ebcf9960aef9d7babf87.tar.gz
bcm5719-llvm-62456e579eebe012e5a6ebcf9960aef9d7babf87.zip
[lldb/CMake] Rename LLDB_DISABLE_LIBEDIT to LLDB_ENABLE_LIBEDIT
This matches the naming scheme used by LLVM. Differential revision: https://reviews.llvm.org/D71380
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Core/CMakeLists.txt2
-rw-r--r--lldb/source/Core/IOHandler.cpp34
-rw-r--r--lldb/source/Host/CMakeLists.txt8
-rw-r--r--lldb/source/Interpreter/CMakeLists.txt2
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp2
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt4
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h2
7 files changed, 27 insertions, 27 deletions
diff --git a/lldb/source/Core/CMakeLists.txt b/lldb/source/Core/CMakeLists.txt
index 25ce5183571..ff2355a3927 100644
--- a/lldb/source/Core/CMakeLists.txt
+++ b/lldb/source/Core/CMakeLists.txt
@@ -98,7 +98,7 @@ add_dependencies(lldbCore
# TODO: Remove once we have better layering
set_target_properties(lldbCore PROPERTIES LINK_INTERFACE_MULTIPLICITY 4)
-if (NOT LLDB_DISABLE_LIBEDIT)
+if (LLDB_ENABLE_LIBEDIT)
target_include_directories(lldbCore PRIVATE ${libedit_INCLUDE_DIRS})
endif()
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index 38e65e63d58..b8134716f93 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -22,7 +22,7 @@
#include "lldb/Utility/StringList.h"
#include "lldb/lldb-forward.h"
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
#include "lldb/Host/Editline.h"
#endif
#include "lldb/Interpreter/CommandCompletions.h"
@@ -234,7 +234,7 @@ IOHandlerEditline::IOHandlerEditline(
IOHandlerDelegate &delegate, repro::DataRecorder *data_recorder)
: IOHandler(debugger, type, input_sp, output_sp, error_sp, flags,
data_recorder),
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
m_editline_up(),
#endif
m_delegate(delegate), m_prompt(), m_continuation_prompt(),
@@ -244,7 +244,7 @@ IOHandlerEditline::IOHandlerEditline(
m_editing(false) {
SetPrompt(prompt);
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
bool use_editline = false;
use_editline = GetInputFILE() && GetOutputFILE() && GetErrorFILE() &&
@@ -272,7 +272,7 @@ IOHandlerEditline::IOHandlerEditline(
}
IOHandlerEditline::~IOHandlerEditline() {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
m_editline_up.reset();
#endif
}
@@ -308,7 +308,7 @@ static Optional<std::string> SplitLineEOF(std::string &line_buffer) {
}
bool IOHandlerEditline::GetLine(std::string &line, bool &interrupted) {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up) {
bool b = m_editline_up->GetLine(line, interrupted);
if (b && m_data_recorder)
@@ -402,7 +402,7 @@ bool IOHandlerEditline::GetLine(std::string &line, bool &interrupted) {
return (bool)got_line;
}
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
bool IOHandlerEditline::IsInputCompleteCallback(Editline *editline,
StringList &lines,
void *baton) {
@@ -429,14 +429,14 @@ void IOHandlerEditline::AutoCompleteCallback(CompletionRequest &request,
#endif
const char *IOHandlerEditline::GetPrompt() {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up) {
return m_editline_up->GetPrompt();
} else {
#endif
if (m_prompt.empty())
return nullptr;
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
}
#endif
return m_prompt.c_str();
@@ -445,7 +445,7 @@ const char *IOHandlerEditline::GetPrompt() {
bool IOHandlerEditline::SetPrompt(llvm::StringRef prompt) {
m_prompt = prompt;
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up)
m_editline_up->SetPrompt(m_prompt.empty() ? nullptr : m_prompt.c_str());
#endif
@@ -460,7 +460,7 @@ const char *IOHandlerEditline::GetContinuationPrompt() {
void IOHandlerEditline::SetContinuationPrompt(llvm::StringRef prompt) {
m_continuation_prompt = prompt;
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up)
m_editline_up->SetContinuationPrompt(m_continuation_prompt.empty()
? nullptr
@@ -473,7 +473,7 @@ void IOHandlerEditline::SetBaseLineNumber(uint32_t line) {
}
uint32_t IOHandlerEditline::GetCurrentLineIndex() const {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up)
return m_editline_up->GetCurrentLine();
#endif
@@ -484,7 +484,7 @@ bool IOHandlerEditline::GetLines(StringList &lines, bool &interrupted) {
m_current_lines_ptr = &lines;
bool success = false;
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up) {
return m_editline_up->GetLines(m_base_line_number, lines, interrupted);
} else {
@@ -514,7 +514,7 @@ bool IOHandlerEditline::GetLines(StringList &lines, bool &interrupted) {
}
}
success = lines.GetSize() > 0;
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
}
#endif
return success;
@@ -554,7 +554,7 @@ void IOHandlerEditline::Run() {
}
void IOHandlerEditline::Cancel() {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up)
m_editline_up->Cancel();
#endif
@@ -565,7 +565,7 @@ bool IOHandlerEditline::Interrupt() {
if (m_delegate.IOHandlerInterrupt(*this))
return true;
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up)
return m_editline_up->Interrupt();
#endif
@@ -573,14 +573,14 @@ bool IOHandlerEditline::Interrupt() {
}
void IOHandlerEditline::GotEOF() {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up)
m_editline_up->Interrupt();
#endif
}
void IOHandlerEditline::PrintAsync(Stream *stream, const char *s, size_t len) {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
if (m_editline_up)
m_editline_up->PrintAsync(stream, s, len);
else
diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt
index ff849e2743d..2da0b939bd4 100644
--- a/lldb/source/Host/CMakeLists.txt
+++ b/lldb/source/Host/CMakeLists.txt
@@ -52,7 +52,7 @@ add_host_subdirectory(common
common/XML.cpp
)
-if (NOT LLDB_DISABLE_LIBEDIT)
+if (LLDB_ENABLE_LIBEDIT)
add_host_subdirectory(common
common/Editline.cpp
)
@@ -155,14 +155,14 @@ endif ()
if (HAVE_LIBDL)
list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})
endif()
-if (NOT LLDB_DISABLE_LIBEDIT)
+if (LLDB_ENABLE_LIBEDIT)
list(APPEND EXTRA_LIBS ${libedit_LIBRARIES})
endif()
if (LLDB_ENABLE_LZMA)
list(APPEND EXTRA_LIBS ${LIBLZMA_LIBRARIES})
endif()
-if (NOT LLDB_DISABLE_LIBEDIT)
+if (LLDB_ENABLE_LIBEDIT)
list(APPEND LLDB_LIBEDIT_LIBS ${libedit_LIBRARIES})
if (LLVM_BUILD_STATIC)
list(APPEND LLDB_SYSTEM_LIBS gpm)
@@ -183,6 +183,6 @@ add_lldb_library(lldbHost
Support
)
-if (NOT LLDB_DISABLE_LIBEDIT)
+if (LLDB_ENABLE_LIBEDIT)
target_include_directories(lldbHost PUBLIC ${libedit_INCLUDE_DIRS})
endif()
diff --git a/lldb/source/Interpreter/CMakeLists.txt b/lldb/source/Interpreter/CMakeLists.txt
index 3900799b056..be9843e1101 100644
--- a/lldb/source/Interpreter/CMakeLists.txt
+++ b/lldb/source/Interpreter/CMakeLists.txt
@@ -69,6 +69,6 @@ add_dependencies(lldbInterpreter
LLDBInterpreterPropertiesGen
LLDBInterpreterPropertiesEnumGen)
-if (NOT LLDB_DISABLE_LIBEDIT)
+if (LLDB_ENABLE_LIBEDIT)
target_include_directories(lldbInterpreter PRIVATE ${libedit_INCLUDE_DIRS})
endif()
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index ace7e4d64d6..7c2739f9dd4 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -49,7 +49,7 @@
#include "lldb/Utility/Timer.h"
#include "lldb/Host/Config.h"
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
#include "lldb/Host/Editline.h"
#endif
#include "lldb/Host/Host.h"
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
index 5be6934c191..e8d1e762eff 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
@@ -3,7 +3,7 @@ if(NOT LLDB_PYTHON_RELATIVE_PATH)
endif()
add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${LLDB_PYTHON_RELATIVE_PATH}")
-if (NOT LLDB_DISABLE_LIBEDIT)
+if (LLDB_ENABLE_LIBEDIT)
list(APPEND LLDB_LIBEDIT_LIBS ${libedit_LIBRARIES})
endif()
@@ -26,7 +26,7 @@ add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
Support
)
-if (NOT LLDB_DISABLE_LIBEDIT)
+if (LLDB_ENABLE_LIBEDIT)
target_include_directories(lldbPluginScriptInterpreterPython PUBLIC
${libedit_INCLUDE_DIRS}
)
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
index 4f25c46eefa..c0d39324e03 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
@@ -9,7 +9,7 @@
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
-#if !defined(LLDB_DISABLE_LIBEDIT) && defined(__linux__)
+#if LLDB_ENABLE_LIBEDIT && defined(__linux__)
// NOTE: Since Python may define some pre-processor definitions which affect the
// standard headers on some systems, you must include Python.h before any
// standard headers are included.
OpenPOWER on IntegriCloud