mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
The ResourceManager interface can be used to implement ownership for resources allocated to JIT'd code, e.g. memory and metadata registrations (frame info, language runtime metadata, etc.). Resources can be *deallocated*, meaning that they should be cleaned up (memory released, registrations deregistered, etc.), or they can be *detached*, meaning that cleanup should be performed automatically when the ResourceManager itself is destroyed. The intent is to allow JIT'd code to continue running after the llvm::orc::ExecutionSession that produced it is disconnected / destroyed.
20 lines
663 B
C++
20 lines
663 B
C++
//===- ResourceManager.cpp ------------------------------------------------===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Contains the implementation of APIs in the orc-rt/ResourceManager.h header.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "orc-rt/ResourceManager.h"
|
|
|
|
namespace orc_rt {
|
|
|
|
ResourceManager::~ResourceManager() = default;
|
|
|
|
} // namespace orc_rt
|