//===-- RTDyldMemoryManager.cpp - Memory manager for MC-JIT -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // Interface of the runtime dynamic memory manager base class. // //===----------------------------------------------------------------------===// #ifndef LLVM_EXECUTIONENGINE_RTDYLDMEMORYMANAGER_H #define LLVM_EXECUTIONENGINE_RTDYLDMEMORYMANAGER_H #include "llvm-c/ExecutionEngine.h" #include "llvm/ExecutionEngine/JITSymbol.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" #include "llvm/Support/CBindingWrapping.h" #include <cstddef> #include <cstdint> #include <string> namespace llvm { class ExecutionEngine; namespace object { class ObjectFile; } // end namespace object class MCJITMemoryManager : public RuntimeDyld::MemoryManager { … }; // RuntimeDyld clients often want to handle the memory management of // what gets placed where. For JIT clients, this is the subset of // JITMemoryManager required for dynamic loading of binaries. // // FIXME: As the RuntimeDyld fills out, additional routines will be needed // for the varying types of objects to be allocated. class RTDyldMemoryManager : public MCJITMemoryManager, public LegacyJITSymbolResolver { … }; // Create wrappers for C Binding types (see CBindingWrapping.h). DEFINE_SIMPLE_CONVERSION_FUNCTIONS(…) } // end namespace llvm #endif // LLVM_EXECUTIONENGINE_RTDYLDMEMORYMANAGER_H