WasmReader.h 855 B

12345678910111213141516171819202122232425262728293031
  1. //===- WasmReader.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_WASM_WASMREADER_H
  9. #define LLVM_LIB_OBJCOPY_WASM_WASMREADER_H
  10. #include "WasmObject.h"
  11. namespace llvm {
  12. namespace objcopy {
  13. namespace wasm {
  14. class Reader {
  15. public:
  16. explicit Reader(const object::WasmObjectFile &O) : WasmObj(O) {}
  17. Expected<std::unique_ptr<Object>> create() const;
  18. private:
  19. const object::WasmObjectFile &WasmObj;
  20. };
  21. } // end namespace wasm
  22. } // end namespace objcopy
  23. } // end namespace llvm
  24. #endif // LLVM_LIB_OBJCOPY_WASM_WASMREADER_H