[Lldb-commits] [PATCH] D63052: [Target] Remove Process::GetObjCLanguageRuntime
Saleem Abdulrasool via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Jun 9 12:49:22 PDT 2019
compnerd added inline comments.
================
Comment at: include/lldb/Target/ObjCLanguageRuntime.h:202
+ static ObjCLanguageRuntime *GetObjCLanguageRuntime(Process &process) {
+ return llvm::cast_or_null<ObjCLanguageRuntime>(
----------------
I think it would be nice to just call this `Get` (and we could have equivalents in the other languages). It makes the uses less verbose and repetitive.
================
Comment at: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:515
if (process_sp && lang_opts.ObjC) {
- if (process_sp->GetObjCLanguageRuntime()) {
- if (process_sp->GetObjCLanguageRuntime()->GetRuntimeVersion() ==
+ if (ObjCLanguageRuntime::GetObjCLanguageRuntime(*process_sp)) {
+ if (ObjCLanguageRuntime::GetObjCLanguageRuntime(*process_sp)
----------------
Why not create a variable?
`if (const auto *runtime = ObjCLanguageRuntime::Get(*process))`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63052/new/
https://reviews.llvm.org/D63052
More information about the lldb-commits
mailing list