[Lldb-commits] [PATCH] D65185: Let tablegen generate property definitions
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 23 20:14:28 PDT 2019
JDevlieghere created this revision.
JDevlieghere added reviewers: teemperor, friss, xiaobai, labath, clayborg.
Herald added a subscriber: mgorny.
Herald added a reviewer: jdoerfert.
Herald added a project: LLDB.
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 78003 bytes
Desc: not available
More information about the lldb-commits