1 //===-- JITLoader.cpp -------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // Other libraries and framework includes
14 #include "lldb/Target/JITLoader.h"
15 #include "lldb/Core/PluginManager.h"
16 #include "lldb/Target/JITLoaderList.h"
17 #include "lldb/Target/Process.h"
18 #include "lldb/lldb-private.h"
21 using namespace lldb_private;
23 void JITLoader::LoadPlugins(Process *process, JITLoaderList &list) {
24 JITLoaderCreateInstance create_callback = nullptr;
25 for (uint32_t idx = 0;
27 PluginManager::GetJITLoaderCreateCallbackAtIndex(idx)) != nullptr;
29 JITLoaderSP instance_sp(create_callback(process, false));
31 list.Append(std::move(instance_sp));
35 JITLoader::JITLoader(Process *process) : m_process(process) {}
37 JITLoader::~JITLoader() = default;