[Clang] ensure mangled names are valid identifiers before being suggested in ifunc...
[llvm-project.git] / lldb / source / Target / JITLoader.cpp
blob8ff349e063b6241e19a93bc4540f48499fe6fffe
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 //===----------------------------------------------------------------------===//
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"
15 using namespace lldb;
16 using namespace lldb_private;
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));
30 JITLoader::JITLoader(Process *process) : m_process(process) {}
32 JITLoader::~JITLoader() = default;