LLVM  14.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 
20 #include <vector>
21 
22 namespace llvm {
23 
24 class Error;
25 class GlobalValue;
26 class StructType;
27 
29 protected:
30  GVMaterializer() = default;
31 
32 public:
33  virtual ~GVMaterializer();
34 
35  /// Make sure the given GlobalValue is fully read.
36  ///
37  virtual Error materialize(GlobalValue *GV) = 0;
38 
39  /// Make sure the entire Module has been completely read.
40  ///
41  virtual Error materializeModule() = 0;
42 
43  virtual Error materializeMetadata() = 0;
44  virtual void setStripDebugInfo() = 0;
45 
46  virtual std::vector<StructType *> getIdentifiedStructTypes() const = 0;
47 };
48 
49 } // end namespace llvm
50 
51 #endif // LLVM_IR_GVMATERIALIZER_H
llvm::GVMaterializer::getIdentifiedStructTypes
virtual std::vector< StructType * > getIdentifiedStructTypes() const =0
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::lltok::Error
@ Error
Definition: LLToken.h:21
llvm::GVMaterializer
Definition: GVMaterializer.h:28
llvm::GVMaterializer::materialize
virtual Error materialize(GlobalValue *GV)=0
Make sure the given GlobalValue is fully read.
llvm::GVMaterializer::GVMaterializer
GVMaterializer()=default
llvm::GlobalValue
Definition: GlobalValue.h:44
llvm::GVMaterializer::materializeModule
virtual Error materializeModule()=0
Make sure the entire Module has been completely read.
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::GVMaterializer::~GVMaterializer
virtual ~GVMaterializer()
Definition: GVMaterializer.cpp:17
llvm::GVMaterializer::setStripDebugInfo
virtual void setStripDebugInfo()=0
llvm::GVMaterializer::materializeMetadata
virtual Error materializeMetadata()=0