xref: /freebsd/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/COFF.h (revision 700637cbb5e582861067a11aaca4d053546871d2)
1 //===-------------- COFF.h - COFF format utilities --------------*- 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 // Contains utilities for load COFF relocatable object files.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_EXECUTIONENGINE_ORC_COFF_H
14 #define LLVM_EXECUTIONENGINE_ORC_COFF_H
15 
16 #include "llvm/Support/Compiler.h"
17 #include "llvm/Support/Error.h"
18 #include "llvm/Support/MemoryBuffer.h"
19 
20 #include <set>
21 #include <string>
22 
23 namespace llvm {
24 
25 namespace object {
26 class Archive;
27 } // namespace object
28 
29 namespace orc {
30 
31 class COFFImportFileScanner {
32 public:
COFFImportFileScanner(std::set<std::string> & ImportedDynamicLibraries)33   COFFImportFileScanner(std::set<std::string> &ImportedDynamicLibraries)
34       : ImportedDynamicLibraries(ImportedDynamicLibraries) {}
35   LLVM_ABI Expected<bool>
36   operator()(object::Archive &A, MemoryBufferRef MemberBuf, size_t Index) const;
37 
38 private:
39   std::set<std::string> &ImportedDynamicLibraries;
40 };
41 
42 } // namespace orc
43 } // namespace llvm
44 
45 #endif // LLVM_EXECUTIONENGINE_ORC_MACHO_H
46