[Lldb-commits] [PATCH] D116697: [lldb] Create a property to store the REPL language

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 5 14:09:24 PST 2022


JDevlieghere marked 2 inline comments as done.
JDevlieghere added inline comments.


================
Comment at: lldb/source/Core/Debugger.cpp:1777
 
     if (auto single_lang = repl_languages.GetSingularLanguage()) {
       language = *single_lang;
----------------
aprantl wrote:
> As you said in the description, this is effectively dead code. Is this to be removed in a subsequent patch?
It's still relevant here (upstream) where there's only a single REPL language. The way the plugin mechanism works, anyone downstream could build LLDB with just a single REPL plugin. Because this is all done through plugins, the default REPL language is unknown. I vote to keep it around until there's a good way to set it. The latter isn't hard technically, it's just a matter of doing it in an organized way. E.g. who wins if two plugins want to be the default?


================
Comment at: lldb/source/Interpreter/CommandInterpreter.cpp:2265
+  if (language == eLanguageTypeUnknown) {
+    LanguageSet repl_languages = Language::GetLanguagesSupportingREPLs();
+    if (auto main_repl_language = repl_languages.GetSingularLanguage())
----------------
aprantl wrote:
> Is this case used by anyone? Should we just error out if it's unknown?
Similar answer to above. 


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

https://reviews.llvm.org/D116697



More information about the lldb-commits mailing list