LLDB  mainline
JITLoader.cpp
Go to the documentation of this file.
1 //===-- JITLoader.cpp -----------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
12 #include "lldb/Target/Process.h"
13 #include "lldb/lldb-private.h"
14 
15 using namespace lldb;
16 using namespace lldb_private;
17 
18 void JITLoader::LoadPlugins(Process *process, JITLoaderList &list) {
19  JITLoaderCreateInstance create_callback = nullptr;
20  for (uint32_t idx = 0;
21  (create_callback =
22  PluginManager::GetJITLoaderCreateCallbackAtIndex(idx)) != nullptr;
23  ++idx) {
24  JITLoaderSP instance_sp(create_callback(process, false));
25  if (instance_sp)
26  list.Append(std::move(instance_sp));
27  }
28 }
29 
30 JITLoader::JITLoader(Process *process) : m_process(process) {}
31 
32 JITLoader::~JITLoader() = default;
lldb_private::JITLoaderList
Definition: JITLoaderList.h:22
lldb_private::Process
Definition: Process.h:340
Process.h
lldb_private::JITLoader::~JITLoader
~JITLoader() override
JITLoaderList.h
lldb-private.h
uint32_t
JITLoader.h
PluginManager.h
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::JITLoaderList::Append
void Append(const lldb::JITLoaderSP &jit_loader_sp)
Definition: JITLoaderList.cpp:20
lldb
Definition: SBAddress.h:15