|
|
|||
File indexing completed on 2026-05-10 08:43:54
0001 //===-- ObjectCache.h - Class definition for the ObjectCache ----*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef LLVM_EXECUTIONENGINE_OBJECTCACHE_H 0010 #define LLVM_EXECUTIONENGINE_OBJECTCACHE_H 0011 0012 #include <memory> 0013 0014 namespace llvm { 0015 0016 class MemoryBuffer; 0017 class MemoryBufferRef; 0018 class Module; 0019 0020 /// This is the base ObjectCache type which can be provided to an 0021 /// ExecutionEngine for the purpose of avoiding compilation for Modules that 0022 /// have already been compiled and an object file is available. 0023 class ObjectCache { 0024 virtual void anchor(); 0025 0026 public: 0027 ObjectCache() = default; 0028 0029 virtual ~ObjectCache() = default; 0030 0031 /// notifyObjectCompiled - Provides a pointer to compiled code for Module M. 0032 virtual void notifyObjectCompiled(const Module *M, MemoryBufferRef Obj) = 0; 0033 0034 /// Returns a pointer to a newly allocated MemoryBuffer that contains the 0035 /// object which corresponds with Module M, or 0 if an object is not 0036 /// available. 0037 virtual std::unique_ptr<MemoryBuffer> getObject(const Module* M) = 0; 0038 }; 0039 0040 } // end namespace llvm 0041 0042 #endif // LLVM_EXECUTIONENGINE_OBJECTCACHE_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|