1*80814287SRaphael Isemann //===-- JITLoader.cpp -----------------------------------------------------===// 24b047f23SGreg Clayton // 32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 64b047f23SGreg Clayton // 74b047f23SGreg Clayton //===----------------------------------------------------------------------===// 84b047f23SGreg Clayton 94b047f23SGreg Clayton #include "lldb/Target/JITLoader.h" 10b9c1b51eSKate Stone #include "lldb/Core/PluginManager.h" 114b047f23SGreg Clayton #include "lldb/Target/JITLoaderList.h" 124b047f23SGreg Clayton #include "lldb/Target/Process.h" 13b9c1b51eSKate Stone #include "lldb/lldb-private.h" 144b047f23SGreg Clayton 154b047f23SGreg Clayton using namespace lldb; 164b047f23SGreg Clayton using namespace lldb_private; 174b047f23SGreg Clayton LoadPlugins(Process * process,JITLoaderList & list)18b9c1b51eSKate Stonevoid JITLoader::LoadPlugins(Process *process, JITLoaderList &list) { 199394d772SEugene Zelenko JITLoaderCreateInstance create_callback = nullptr; 20b9c1b51eSKate Stone for (uint32_t idx = 0; 21b9c1b51eSKate Stone (create_callback = 22b9c1b51eSKate Stone PluginManager::GetJITLoaderCreateCallbackAtIndex(idx)) != nullptr; 23b9c1b51eSKate Stone ++idx) { 244b047f23SGreg Clayton JITLoaderSP instance_sp(create_callback(process, false)); 254b047f23SGreg Clayton if (instance_sp) 264b047f23SGreg Clayton list.Append(std::move(instance_sp)); 274b047f23SGreg Clayton } 284b047f23SGreg Clayton } 294b047f23SGreg Clayton JITLoader(Process * process)30b9c1b51eSKate StoneJITLoader::JITLoader(Process *process) : m_process(process) {} 314b047f23SGreg Clayton 329394d772SEugene Zelenko JITLoader::~JITLoader() = default; 33