aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/Target/LanguageRuntime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lldb/source/Target/LanguageRuntime.cpp')
-rw-r--r--contrib/llvm-project/lldb/source/Target/LanguageRuntime.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/contrib/llvm-project/lldb/source/Target/LanguageRuntime.cpp b/contrib/llvm-project/lldb/source/Target/LanguageRuntime.cpp
index 58ad70c2b902..f2e2febf8b88 100644
--- a/contrib/llvm-project/lldb/source/Target/LanguageRuntime.cpp
+++ b/contrib/llvm-project/lldb/source/Target/LanguageRuntime.cpp
@@ -202,26 +202,19 @@ protected:
LanguageRuntime *LanguageRuntime::FindPlugin(Process *process,
lldb::LanguageType language) {
- std::unique_ptr<LanguageRuntime> language_runtime_up;
LanguageRuntimeCreateInstance create_callback;
-
for (uint32_t idx = 0;
(create_callback =
PluginManager::GetLanguageRuntimeCreateCallbackAtIndex(idx)) !=
nullptr;
++idx) {
- language_runtime_up.reset(create_callback(process, language));
-
- if (language_runtime_up)
- return language_runtime_up.release();
+ if (LanguageRuntime *runtime = create_callback(process, language))
+ return runtime;
}
-
return nullptr;
}
-LanguageRuntime::LanguageRuntime(Process *process) : m_process(process) {}
-
-LanguageRuntime::~LanguageRuntime() = default;
+LanguageRuntime::LanguageRuntime(Process *process) : Runtime(process) {}
BreakpointPreconditionSP
LanguageRuntime::GetExceptionPrecondition(LanguageType language,