llvm-project/lldb/utils
Jonas Devlieghere 971f9ca612 Let tablegen generate property definitions
Property definitions are currently defined in a PropertyDefinition array
and have a corresponding enum to index in this array. Unfortunately this
is quite error prone. Indeed, just today we found an incorrect merge
where a discrepancy between the order of the enum values and their
definition caused the test suite to fail spectacularly.

Tablegen can streamline the process of generating the property
definition table while at the same time guaranteeing that the enums stay
in sync. That's exactly what this patch does. It adds a new tablegen
file for the properties, building on top of the infrastructure that
Raphael added recently for the command options. It also introduces two
new tablegen backends: one for the property definitions and one for
their corresponding enums.

It might be worth mentioning that I generated most of the tablegen
definitions from the existing property definitions, by adding a dump
method to the struct. This seems both more efficient and less error
prone that copying everything over by hand. Only Enum properties needed
manual fixup for the EnumValues and DefaultEnumValue fields.

Differential revision: https://reviews.llvm.org/D65185

llvm-svn: 367058
2019-07-25 21:36:37 +00:00
..
TableGen Let tablegen generate property definitions 2019-07-25 21:36:37 +00:00
lit-cpuid [Utils] Add back utils directory 2019-07-23 17:47:08 +00:00
lldb-dotest [Utils] Add back utils directory 2019-07-23 17:47:08 +00:00
lui [Utils] Add back utils directory 2019-07-23 17:47:08 +00:00
test [Utils] Add back utils directory 2019-07-23 17:47:08 +00:00
vim-lldb [Utils] Add back utils directory 2019-07-23 17:47:08 +00:00