XCOFFReader.h 968 B

1234567891011121314151617181920212223242526272829303132333435
  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. #ifndef LLVM_LIB_OBJCOPY_XCOFF_XCOFFREADER_H
  9. #define LLVM_LIB_OBJCOPY_XCOFF_XCOFFREADER_H
  10. #include "XCOFFObject.h"
  11. namespace llvm {
  12. namespace objcopy {
  13. namespace xcoff {
  14. using namespace object;
  15. class XCOFFReader {
  16. public:
  17. explicit XCOFFReader(const XCOFFObjectFile &O) : XCOFFObj(O) {}
  18. Expected<std::unique_ptr<Object>> create() const;
  19. private:
  20. const XCOFFObjectFile &XCOFFObj;
  21. Error readSections(Object &Obj) const;
  22. Error readSymbols(Object &Obj) const;
  23. };
  24. } // end namespace xcoff
  25. } // end namespace objcopy
  26. } // end namespace llvm
  27. #endif // LLVM_LIB_OBJCOPY_XCOFF_XCOFFREADER_H