LLVM 23.0.0git
GVMaterializer.h
Go to the documentation of this file.
1//===- GVMaterializer.h - Interface for GV materializers --------*- C++ -*-===//
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//===----------------------------------------------------------------------===//
8//
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
13// at the same time.
14//
15//===----------------------------------------------------------------------===//
16
17#ifndef LLVM_IR_GVMATERIALIZER_H
18#define LLVM_IR_GVMATERIALIZER_H
19
21#include <vector>
22
23namespace llvm {
24
25class Error;
26class GlobalValue;
27class StructType;
28
30protected:
31 GVMaterializer() = default;
32
33public:
34 virtual ~GVMaterializer();
35
36 /// Make sure the given GlobalValue is fully read.
37 ///
38 virtual Error materialize(GlobalValue *GV) = 0;
39
40 /// Make sure the entire Module has been completely read.
41 ///
42 virtual Error materializeModule() = 0;
43
45 virtual void setStripDebugInfo() = 0;
46
47 virtual std::vector<StructType *> getIdentifiedStructTypes() const = 0;
48};
49
50} // end namespace llvm
51
52#endif // LLVM_IR_GVMATERIALIZER_H
#define LLVM_ABI
Definition Compiler.h:213
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
virtual void setStripDebugInfo()=0
virtual Error materializeModule()=0
Make sure the entire Module has been completely read.
virtual Error materializeMetadata()=0
virtual Error materialize(GlobalValue *GV)=0
Make sure the given GlobalValue is fully read.
virtual ~GVMaterializer()
virtual std::vector< StructType * > getIdentifiedStructTypes() const =0
GVMaterializer()=default
Class to represent struct types.
This is an optimization pass for GlobalISel generic memory operations.