xref: /freebsd/contrib/llvm-project/llvm/lib/ObjCopy/XCOFF/XCOFFReader.h (revision 81ad626541db97eb356e2c1d4a20eb2a26a766ab)
1 //===- XCOFFReader.h --------------------------------------------*- 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 #ifndef LLVM_LIB_OBJCOPY_XCOFF_XCOFFREADER_H
10 #define LLVM_LIB_OBJCOPY_XCOFF_XCOFFREADER_H
11 
12 #include "XCOFFObject.h"
13 
14 namespace llvm {
15 namespace objcopy {
16 namespace xcoff {
17 
18 using namespace object;
19 
20 class XCOFFReader {
21 public:
XCOFFReader(const XCOFFObjectFile & O)22   explicit XCOFFReader(const XCOFFObjectFile &O) : XCOFFObj(O) {}
23   Expected<std::unique_ptr<Object>> create() const;
24 
25 private:
26   const XCOFFObjectFile &XCOFFObj;
27   Error readSections(Object &Obj) const;
28   Error readSymbols(Object &Obj) const;
29 };
30 
31 } // end namespace xcoff
32 } // end namespace objcopy
33 } // end namespace llvm
34 
35 #endif // LLVM_LIB_OBJCOPY_XCOFF_XCOFFREADER_H
36