diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-26 18:14:04 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-26 18:14:04 +0000 |
| commit | 7070a0b02a915a2ae60fee442e13b447ef742e71 (patch) | |
| tree | b1a25e9e9bef20c547ac35a62ac67983eb774ce6 | |
| parent | d6cdd98a25b85a4c14a79542f5b832b21fc5592a (diff) | |
| download | bcm5719-llvm-7070a0b02a915a2ae60fee442e13b447ef742e71.tar.gz bcm5719-llvm-7070a0b02a915a2ae60fee442e13b447ef742e71.zip | |
[TableGen] Move interpreter properties into a separate file (NFC)
With the plugins having their own tablgen file, it makes sense to split
off the interpreter properties as well.
llvm-svn: 367138
| -rw-r--r-- | lldb/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | lldb/include/lldb/Core/Properties.td | 28 | ||||
| -rw-r--r-- | lldb/source/Interpreter/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 4 | ||||
| -rw-r--r-- | lldb/source/Interpreter/Properties.td | 28 |
5 files changed, 44 insertions, 34 deletions
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt index 6d567b3c061..231e441183f 100644 --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -52,14 +52,14 @@ if(CMAKE_CROSSCOMPILING AND LLDB_BUILT_STANDALONE) -DClang_DIR=${NATIVE_Clang_DIR}) endif() +# TableGen add_subdirectory(utils/TableGen) +add_subdirectory(include/lldb/Core) + add_subdirectory(source) add_subdirectory(tools) add_subdirectory(docs) -# Needed by tablegen. -add_subdirectory(include/lldb/Core) - option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests." ${LLVM_INCLUDE_TESTS}) option(LLDB_TEST_USE_CUSTOM_C_COMPILER "Use the C compiler provided via LLDB_TEST_C_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF) option(LLDB_TEST_USE_CUSTOM_CXX_COMPILER "Use the C++ compiler provided via LLDB_TEST_CXX_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF) diff --git a/lldb/include/lldb/Core/Properties.td b/lldb/include/lldb/Core/Properties.td index de7f8b42124..66d7d9fbf77 100644 --- a/lldb/include/lldb/Core/Properties.td +++ b/lldb/include/lldb/Core/Properties.td @@ -349,31 +349,3 @@ let Definition = "debugger" in { DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-without-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">, Desc<"The default frame format string to use when displaying stack frameinformation for threads from thread backtrace unique.">; } - - -let Definition = "commandinterpreter" in { - def ExpandRegexAliases: Property<"expand-regex-aliases", "Boolean">, - Global, - DefaultFalse, - Desc<"If true, regular expression alias commands will show the expanded command that will be executed. This can be used to debug new regular expression alias commands.">; - def PromptOnQuit: Property<"prompt-on-quit", "Boolean">, - Global, - DefaultTrue, - Desc<"If true, LLDB will prompt you before quitting if there are any live processes being debugged. If false, LLDB will quit without asking in any case.">; - def StopCmdSourceOnError: Property<"stop-command-source-on-error", "Boolean">, - Global, - DefaultTrue, - Desc<"If true, LLDB will stop running a 'command source' script upon encountering an error.">; - def SpaceReplPrompts: Property<"space-repl-prompts", "Boolean">, - Global, - DefaultFalse, - Desc<"If true, blank lines will be printed between between REPL submissions.">; - def EchoCommands: Property<"echo-commands", "Boolean">, - Global, - DefaultTrue, - Desc<"If true, commands will be echoed before they are evaluated.">; - def EchoCommentCommands: Property<"echo-comment-commands", "Boolean">, - Global, - DefaultTrue, - Desc<"If true, commands will be echoed even if they are pure comment lines.">; -} diff --git a/lldb/source/Interpreter/CMakeLists.txt b/lldb/source/Interpreter/CMakeLists.txt index 987ad471b37..ece88b14d67 100644 --- a/lldb/source/Interpreter/CMakeLists.txt +++ b/lldb/source/Interpreter/CMakeLists.txt @@ -1,3 +1,11 @@ +lldb_tablegen(Properties.inc -gen-lldb-property-defs + SOURCE Properties.td + TARGET LLDBInterpreterPropertiesGen) + +lldb_tablegen(PropertiesEnum.inc -gen-lldb-property-enum-defs + SOURCE Properties.td + TARGET LLDBInterpreterPropertiesEnumGen) + add_lldb_library(lldbInterpreter CommandAlias.cpp CommandHistory.cpp @@ -56,7 +64,9 @@ add_lldb_library(lldbInterpreter Support ) -add_dependencies(lldbInterpreter LLDBPropertiesGen LLDBPropertiesEnumGen) +add_dependencies(lldbInterpreter + LLDBInterpreterPropertiesGen + LLDBInterpreterPropertiesEnumGen) if (NOT LLDB_DISABLE_LIBEDIT) target_include_directories(lldbInterpreter PRIVATE ${libedit_INCLUDE_DIRS}) diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index e84fe5721cb..f171c8bbdd3 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -91,12 +91,12 @@ static constexpr const char *InitFileWarning = static constexpr PropertyDefinition g_properties[] = { #define LLDB_PROPERTIES_commandinterpreter -#include "lldb/Core/Properties.inc" +#include "Properties.inc" }; enum { #define LLDB_PROPERTIES_commandinterpreter -#include "lldb/Core/PropertiesEnum.inc" +#include "PropertiesEnum.inc" }; ConstString &CommandInterpreter::GetStaticBroadcasterClass() { diff --git a/lldb/source/Interpreter/Properties.td b/lldb/source/Interpreter/Properties.td new file mode 100644 index 00000000000..9ca722e4218 --- /dev/null +++ b/lldb/source/Interpreter/Properties.td @@ -0,0 +1,28 @@ +include "../../include/lldb/Core/PropertiesBase.td" + +let Definition = "commandinterpreter" in { + def ExpandRegexAliases: Property<"expand-regex-aliases", "Boolean">, + Global, + DefaultFalse, + Desc<"If true, regular expression alias commands will show the expanded command that will be executed. This can be used to debug new regular expression alias commands.">; + def PromptOnQuit: Property<"prompt-on-quit", "Boolean">, + Global, + DefaultTrue, + Desc<"If true, LLDB will prompt you before quitting if there are any live processes being debugged. If false, LLDB will quit without asking in any case.">; + def StopCmdSourceOnError: Property<"stop-command-source-on-error", "Boolean">, + Global, + DefaultTrue, + Desc<"If true, LLDB will stop running a 'command source' script upon encountering an error.">; + def SpaceReplPrompts: Property<"space-repl-prompts", "Boolean">, + Global, + DefaultFalse, + Desc<"If true, blank lines will be printed between between REPL submissions.">; + def EchoCommands: Property<"echo-commands", "Boolean">, + Global, + DefaultTrue, + Desc<"If true, commands will be echoed before they are evaluated.">; + def EchoCommentCommands: Property<"echo-comment-commands", "Boolean">, + Global, + DefaultTrue, + Desc<"If true, commands will be echoed even if they are pure comment lines.">; +} |

