[Lldb-commits] [PATCH] D87076: [lldb/Interpreter] Fix language detection for the REPL InitFile
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 3 01:48:04 PDT 2020
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
This patch sparks joy, but the fact that this all is dead code without Swift doesn't spark joy. But as it's up to me to revive this code and the downstream Swift test looks fine, I'll sign this off. Thanks!
================
Comment at: lldb/source/Interpreter/CommandInterpreter.cpp:2096
+ LanguageSet repl_languages = Language::GetLanguagesSupportingREPLs();
+ LanguageType language = {};
+ if (auto main_repl_language = repl_languages.GetSingularLanguage())
----------------
`= eLanguageTypeUnknown`? I don't think we usually initialise enums with braces and it makes the default value clearer.
================
Comment at: lldb/source/Interpreter/CommandInterpreter.cpp:2100
+
if (language == LanguageType::eLanguageTypeUnknown)
return;
----------------
This could now be `else return` to make the error control flow a bit clearer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87076/new/
https://reviews.llvm.org/D87076
More information about the lldb-commits
mailing list