summaryrefslogtreecommitdiffstats
path: root/lldb/utils/TableGen/LLDBOptionDefEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [TableGen] Move helpers into LLDBTableGenUtils.Jonas Devlieghere2019-07-311-10/+2
| | | | | | | Instead of polluting the LLDBTableGenBackends header with helpers used by both emitters, move them into a separate files. llvm-svn: 367377
* [TableGen] Reuse typedef across emitters (NFC)Jonas Devlieghere2019-07-301-12/+5
| | | | | | | This moves the std::map typedef into the header so it can be reused by all the emitter implementations. llvm-svn: 367363
* [lldb][NFC] Split emitting and parsing in LLDBOptionDefEmitterRaphael Isemann2019-07-291-42/+80
| | | | | | | | Splitting the different logic is cleaner and we it will be easier to implement the enum emitting (which otherwise would have to reimplement the Record parsing). llvm-svn: 367207
* [lldb] Also include the array definition in CommandOptions.incRaphael Isemann2019-07-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Right now our CommandOptions.inc only generates the initializer for the options list but not the array declaration boilerplate around it. As the array definition is identical for all arrays, we might as well also let the CommandOptions.inc generate it alongside the initializers. This patch will also allow us to generate additional declarations related to that option list in the future (e.g. a enum class representing the specific options which would make our handling code less prone). This patch also fixes a few option tables that didn't follow our naming style. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65331 llvm-svn: 367186
* [lldb] Don't dynamically allocate the posix option validator.Raphael Isemann2019-07-261-1/+7
| | | | | | | | We dynamically allocate the option validator which means we can't mark this list of OptionDefinitions as constexpr. It's also more complicated than necessary. llvm-svn: 367102
* [TableGen] Fix comments/headers referencing clang (NFC)Jonas Devlieghere2019-07-251-1/+1
| | | | | | | Remove references to clang's TableGen implementation. Presumably these files were originally copied over. llvm-svn: 366982
* [Utils] Add back utils directoryJonas Devlieghere2019-07-231-0/+153
| | | | | | | Due to a bug my earlier commit removed the whole utils directory: https://reviews.llvm.org/D65123 llvm-svn: 366830
* [Utils] Remove legacy scriptsJonas Devlieghere2019-07-231-153/+0
| | | | | | | As pointed out by Nathan in D65155, these scrips don't seem to serve any real need anymore. llvm-svn: 366827
* [lldb][NFC] Tablegenify breakpointRaphael Isemann2019-07-221-3/+5
| | | | llvm-svn: 366673
* [lldb] Don't double emit option groupsRaphael Isemann2019-07-181-1/+0
| | | | | | | | | We currently emit the option groups twice if Groups<[1,2,3]> is used in the tablegen. This leads to compilation errors. This patch just removes the line that accidentially emits the option group a second time. llvm-svn: 366414
* [lldb] Let table gen create command option initializers.Raphael Isemann2019-07-121-0/+152
Summary: We currently have man large arrays containing initializers for our command options. These tables are tricky maintain as we don't have any good place to check them for consistency and it's also hard to read (`nullptr, {}, 0` is not very descriptive). This patch fixes this by letting table gen generate those tables. This way we can have a more readable syntax for this (especially for all the default arguments) and we can let TableCheck check them for consistency (e.g. an option with an optional argument can't have `eArgTypeNone`, naming of flags', etc.). Also refactoring the related data structures can now be done without changing the hundred of option initializers. For example, this line: ``` {LLDB_OPT_SET_ALL, false, "hide-aliases", 'a', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Hide aliases in the command list."}, ``` becomes this: ``` def hide_aliases : Option<"hide-aliases", "a">, Desc<"Hide aliases in the command list.">; ``` For now I just moved a few initializers to the new format to demonstrate the change. I'll slowly migrate the other option initializers tables in separate patches. Reviewers: JDevlieghere, davide, sgraenitz Reviewed By: JDevlieghere Subscribers: jingham, xiaobai, labath, mgorny, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64365 llvm-svn: 365908
OpenPOWER on IntegriCloud