[Lldb-commits] [PATCH] D43647: Generate most of the target properties from a central specification.
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 23 07:14:06 PST 2018
clayborg added a comment.
In https://reviews.llvm.org/D43647#1016882, @aprantl wrote:
> I like Pavel's template syntax. It's not clear to me how to best implement the registering of the properties this way though. I think we want to avoid static intializers. Given how TargetProperties::TargetProperties() is implemented, I could imagine we could just make the properties members of the class, we just need some way to generate a for-each-property loop to handle the initialization. I'll think about this some more.
We do want to avoid static initializers that happen automatically via the C++ global constructor chain, but we have the class static lldb_pricvate::*::Initialize() and that would be a perfect place to place these property definitions. I like Pavel's templated approach as well. I do second that it would be nice to be able to debug. I really dislike the .def file stuff in LLVM code. Although it is easy to maintain, you can't look at the code and figure anything out, you must preprocess the file for many things just to see what it is. I wouldn't mind it if we generated the source file from a .def file and then checked that file in so we can actually read the code...
Repository:
rL LLVM
https://reviews.llvm.org/D43647
More information about the lldb-commits
mailing list