[Lldb-commits] [PATCH] D61921: [Target] Generalize language-specific behavior in ThreadPlanStepThrough

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 14 17:57:14 PDT 2019

xiaobai added a comment.

In D61921#1502254 <https://reviews.llvm.org/D61921#1502254>, @jingham wrote:

> There is a TypeSystemEnumerateSupportedLanguages that we use so that we don't have to enumerate over all the language in the languages enums.  After all the plugin manager knows which languages we have type systems for. If you're going to be doing a lot of this generalization, can you add a similar enumeration for the LanguageRuntimes?   There are 40 or so languages in the language enum but we only have a couple of LanguageRuntimes...

My understanding is `TypeSystemEnumerateSupportedLanguages` is just for getting what languages are supported by the currently loaded TypeSystems (e.g. ClangASTContext) and not necessarily all the loaded language plugins. From what I understand, this is handled by Language itself using a map that it populates on-demand.

The same is probably achievable with LanguageRuntimes. I think adding a `ForEachLanguageRuntime` method to Process that would populate its LanguageRuntimes map on demand much like Language does would probably give us a similar effect. I could do this in a follow up commit to make these kinds of situations a little more efficient. What do you think of this plan?



More information about the lldb-commits mailing list