[Lldb-commits] [PATCH] D73119: [lldb/Initializers] Rename plugins to match their entry points

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 22 02:36:35 PST 2020

labath added a comment.

In D73119#1832707 <https://reviews.llvm.org/D73119#1832707>, @JDevlieghere wrote:

> I think the remaining discrepancies between the plugin name and the directory make sense. For example, I don't really see the benefit of renaming `AppleObjCRuntime` to `LanguageRuntimeAppleObjeC`. The `ClangASTContext` is the exception, but I really don't want to rename that class :-)

The choice of ClangASTContext seems particularly unfortunate, as:

- the class with that name is not even inside that folder
- that class is about to get renamed to ClangTypeSystem (in D72684 <https://reviews.llvm.org/D72684> -- I'm not sure what is that patch waiting for)

Is there even an `Initialize` function in `ExpressionParser/Clang` ? I don't see any.. It seems this is one of those not-really-plugins. And if that's the case, then you should be able to ignore it for now. Once this becomes a "real" plugin, it will get an Initialize function, and we can create an "ExpressionParserClang" class to house that function...

As for `AppleObjCRuntime`, I'm not insisting on changing that, though I am wondering if that won't get it your way when autogenerating the initalizers. I'm not fully sure what are your plans for that. If you're going to generate the `#include` lines then it looks like this discrepancy will matter. If you're going the "extern" route, then generating `#include` is not needed and you headers can be called anything. With the global constructor approach (my favourite :P) we wouldn't need to autogenerate anything at all...



More information about the lldb-commits mailing list