1 //===- GVMaterializer.h - Interface for GV materializers --------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file provides an abstract interface for loading a module from some
10 // place. This interface allows incremental or random access loading of
11 // functions from the file. This is useful for applications like JIT compilers
12 // or interprocedural optimizers that do not need the entire program in memory
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_IR_GVMATERIALIZER_H
18 #define LLVM_IR_GVMATERIALIZER_H
28 class GVMaterializer
{
30 GVMaterializer() = default;
33 virtual ~GVMaterializer();
35 /// Make sure the given GlobalValue is fully read.
37 virtual Error
materialize(GlobalValue
*GV
) = 0;
39 /// Make sure the entire Module has been completely read.
41 virtual Error
materializeModule() = 0;
43 virtual Error
materializeMetadata() = 0;
44 virtual void setStripDebugInfo() = 0;
46 virtual std::vector
<StructType
*> getIdentifiedStructTypes() const = 0;
49 } // end namespace llvm
51 #endif // LLVM_IR_GVMATERIALIZER_H