[Alignment][NFC] Support compile time constants
[llvm-core.git] / include / llvm / IR / GVMaterializer.h
blobd62da41ebc296626365bdc05794877798963bde2
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.
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_IR_GVMATERIALIZER_H
18 #define LLVM_IR_GVMATERIALIZER_H
20 #include <vector>
22 namespace llvm {
24 class Error;
25 class GlobalValue;
26 class StructType;
28 class GVMaterializer {
29 protected:
30 GVMaterializer() = default;
32 public:
33 virtual ~GVMaterializer();
35 /// Make sure the given GlobalValue is fully read.
36 ///
37 virtual Error materialize(GlobalValue *GV) = 0;
39 /// Make sure the entire Module has been completely read.
40 ///
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