LLVM: include/llvm/Object/COFFImportFile.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#ifndef LLVM_OBJECT_COFFIMPORTFILE_H
17#define LLVM_OBJECT_COFFIMPORTFILE_H
18
27
28namespace llvm {
30
33 "__NULL_IMPORT_DESCRIPTOR";
36
38private:
39 enum SymbolIndex { ImpSymbol, ThunkSymbol, ECAuxSymbol, ECThunkSymbol };
40
41public:
44
45 static bool classof(Binary const *V) { return V->isCOFFImportFile(); }
46
48
50
54
58
61 if (isData())
62 Symb.p = ImpSymbol + 1;
64 Symb.p = ECThunkSymbol + 1;
65 else
66 Symb.p = ThunkSymbol + 1;
68 }
69
70 bool is64Bit() const override { return false; }
71
74 Data.getBufferStart());
75 }
76
78
79 StringRef getFileFormatName() const;
81
82private:
83 bool isData() const {
85 }
86};
87
89
90
91
93
94
95
97
98
99
101
102
103
104
105
107
108
109
111
117
119 return L.Name == R.Name && L.ExtName == R.ExtName &&
120 L.Ordinal == R.Ordinal && L.Noname == R.Noname &&
121 L.Data == R.Data && L.Private == R.Private;
122 }
123
125 return !(L == R);
126 }
127};
128
129
130
131
132
133
134
135
136
137
138
143
144}
145}
146
147#endif
Function const char TargetMachine * Machine
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
This is a value type class that represents a single symbol in the list of symbols in the object file.
const coff_import_header * getCOFFImportHeader() const
Definition COFFImportFile.h:72
Expected< uint32_t > getSymbolFlags(DataRefImpl Symb) const override
Definition COFFImportFile.h:51
bool is64Bit() const override
Definition COFFImportFile.h:70
void moveSymbolNext(DataRefImpl &Symb) const override
Definition COFFImportFile.h:47
COFFImportFile(MemoryBufferRef Source)
Definition COFFImportFile.h:42
basic_symbol_iterator symbol_begin() const override
Definition COFFImportFile.h:55
basic_symbol_iterator symbol_end() const override
Definition COFFImportFile.h:59
static bool classof(Binary const *V)
Definition COFFImportFile.h:45
uint16_t getMachine() const
Definition COFFImportFile.h:77
SymbolicFile(unsigned int Type, MemoryBufferRef Source)
This class implements an extremely fast bulk output stream that can only output to a stream.
bool isArm64EC(T Machine)
constexpr std::string_view NullImportDescriptorSymbolName
Definition COFFImportFile.h:32
content_iterator< BasicSymbolRef > basic_symbol_iterator
constexpr std::string_view NullThunkDataPrefix
Definition COFFImportFile.h:34
constexpr std::string_view NullThunkDataSuffix
Definition COFFImportFile.h:35
constexpr std::string_view ImportDescriptorPrefix
Definition COFFImportFile.h:31
LLVM_ABI Error writeImportLibrary(StringRef ImportName, StringRef Path, ArrayRef< COFFShortExport > Exports, COFF::MachineTypes Machine, bool MinGW, ArrayRef< COFFShortExport > NativeExports={})
Writes a COFF import library containing entries described by the Exports array.
This is an optimization pass for GlobalISel generic memory operations.
Definition COFFImportFile.h:88
std::string Name
The name of the export as specified in the .def file or on the command line, i.e.
Definition COFFImportFile.h:92
std::string SymbolName
The real, mangled symbol name from the object file.
Definition COFFImportFile.h:100
bool Private
Definition COFFImportFile.h:115
std::string ExportAs
Specifies EXPORTAS name.
Definition COFFImportFile.h:110
friend bool operator!=(const COFFShortExport &L, const COFFShortExport &R)
Definition COFFImportFile.h:124
uint16_t Ordinal
Definition COFFImportFile.h:112
std::string ImportName
Creates an import library entry that imports from a DLL export with a different name.
Definition COFFImportFile.h:106
std::string ExtName
The external, exported name.
Definition COFFImportFile.h:96
friend bool operator==(const COFFShortExport &L, const COFFShortExport &R)
Definition COFFImportFile.h:118
bool Noname
Definition COFFImportFile.h:113
bool Data
Definition COFFImportFile.h:114
bool Constant
Definition COFFImportFile.h:116