[Lldb-commits] [PATCH] D65489: Tablegen option enum value elements

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 31 00:00:34 PDT 2019


JDevlieghere added a comment.

In D65489#1607801 <https://reviews.llvm.org/D65489#1607801>, @labath wrote:

> Why do we need a separate backend for this? Couldn't this be emitted as a part of the same `#include "XXXProperties.inc"` which defines the property definition? The two logically belong together, and the only reason they were separate variables in the first place was the limitations of constexpr global variables...


I'm not sure what you mean by that last sentence, maybe because I don't know the history? Can you elaborate a bit on the "separate variables" part?

To answer your question: the `OptionEnumValueElement`s are used both by properties and command options. Technically it is possible to put them in the same `.td` files, and emit them in the same `.inc` file. The actual code wouldn't change, just the way we invoke: instead of being its own backend, it would be called from both existing backends. I don't have a strong preference for either approach.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65489/new/

https://reviews.llvm.org/D65489





More information about the lldb-commits mailing list