[Lldb-commits] [PATCH] D62562: [Target] Introduce Process::GetLanguageRuntimes
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed May 29 01:39:38 PDT 2019
labath added inline comments.
================
Comment at: source/Target/Process.cpp:1565
+ for (const lldb::LanguageType lang_type : Language::GetSupportedLanguages()) {
+ if (auto runtime = GetLanguageRuntime(lang_type, retry_if_null))
+ language_runtimes.emplace_back(std::move(runtime));
----------------
Use `auto *` to make it clear that this is a pointer (or even `LanguageRuntime *`, as the type is not that long). Then drop `std::move` below, as it's useless for pointers.
================
Comment at: source/Target/Thread.cpp:2217-2218
+ for (LanguageRuntime *runtime : language_runtimes) {
+ if (!runtime)
+ continue;
+
----------------
It looks like the code already makes sure null pointers don't make it into the list. We should make that a part of the contract and not check it twice.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62562/new/
https://reviews.llvm.org/D62562
More information about the lldb-commits
mailing list