1 //===-- JITLoader.cpp -----------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Target/JITLoader.h"
10 #include "lldb/Core/PluginManager.h"
11 #include "lldb/Target/JITLoaderList.h"
12 #include "lldb/Target/Process.h"
13 #include "lldb/lldb-private.h"
16 using namespace lldb_private
;
18 void JITLoader::LoadPlugins(Process
*process
, JITLoaderList
&list
) {
19 JITLoaderCreateInstance create_callback
= nullptr;
20 for (uint32_t idx
= 0;
22 PluginManager::GetJITLoaderCreateCallbackAtIndex(idx
)) != nullptr;
24 JITLoaderSP
instance_sp(create_callback(process
, false));
26 list
.Append(std::move(instance_sp
));
30 JITLoader::JITLoader(Process
*process
) : m_process(process
) {}
32 JITLoader::~JITLoader() = default;