1cfca06d7SDimitry Andric //===-- JITLoader.cpp -----------------------------------------------------===// 20cac4ca3SEd Maste // 35f29bb8aSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 45f29bb8aSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 55f29bb8aSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60cac4ca3SEd Maste // 70cac4ca3SEd Maste //===----------------------------------------------------------------------===// 80cac4ca3SEd Maste 90cac4ca3SEd Maste #include "lldb/Target/JITLoader.h" 1014f1b3e8SDimitry Andric #include "lldb/Core/PluginManager.h" 110cac4ca3SEd Maste #include "lldb/Target/JITLoaderList.h" 120cac4ca3SEd Maste #include "lldb/Target/Process.h" 1314f1b3e8SDimitry Andric #include "lldb/lldb-private.h" 140cac4ca3SEd Maste 150cac4ca3SEd Maste using namespace lldb; 160cac4ca3SEd Maste using namespace lldb_private; 170cac4ca3SEd Maste LoadPlugins(Process * process,JITLoaderList & list)1814f1b3e8SDimitry Andricvoid JITLoader::LoadPlugins(Process *process, JITLoaderList &list) { 19f3fbd1c0SDimitry Andric JITLoaderCreateInstance create_callback = nullptr; 2014f1b3e8SDimitry Andric for (uint32_t idx = 0; 2114f1b3e8SDimitry Andric (create_callback = 2214f1b3e8SDimitry Andric PluginManager::GetJITLoaderCreateCallbackAtIndex(idx)) != nullptr; 2314f1b3e8SDimitry Andric ++idx) { 240cac4ca3SEd Maste JITLoaderSP instance_sp(create_callback(process, false)); 250cac4ca3SEd Maste if (instance_sp) 260cac4ca3SEd Maste list.Append(std::move(instance_sp)); 270cac4ca3SEd Maste } 280cac4ca3SEd Maste } 290cac4ca3SEd Maste JITLoader(Process * process)3014f1b3e8SDimitry AndricJITLoader::JITLoader(Process *process) : m_process(process) {} 310cac4ca3SEd Maste 32f3fbd1c0SDimitry Andric JITLoader::~JITLoader() = default; 33