ELF_riscv.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===----- ELF_riscv.h - JIT link functions for ELF/riscv ----*- C++ -*----===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. //===----------------------------------------------------------------------===//
  15. //
  16. // jit-link functions for ELF/riscv.
  17. //
  18. //===----------------------------------------------------------------------===//
  19. #ifndef LLVM_EXECUTIONENGINE_JITLINK_ELF_RISCV_H
  20. #define LLVM_EXECUTIONENGINE_JITLINK_ELF_RISCV_H
  21. #include "llvm/ExecutionEngine/JITLink/JITLink.h"
  22. namespace llvm {
  23. namespace jitlink {
  24. /// Create a LinkGraph from an ELF/riscv relocatable object
  25. ///
  26. /// Note: The graph does not take ownership of the underlying buffer, nor copy
  27. /// its contents. The caller is responsible for ensuring that the object buffer
  28. /// outlives the graph.
  29. Expected<std::unique_ptr<LinkGraph>>
  30. createLinkGraphFromELFObject_riscv(MemoryBufferRef ObjectBuffer);
  31. /// jit-link the given object buffer, which must be a ELF riscv object file.
  32. void link_ELF_riscv(std::unique_ptr<LinkGraph> G,
  33. std::unique_ptr<JITLinkContext> Ctx);
  34. } // end namespace jitlink
  35. } // end namespace llvm
  36. #endif // LLVM_EXECUTIONENGINE_JITLINK_ELF_RISCV_H
  37. #ifdef __GNUC__
  38. #pragma GCC diagnostic pop
  39. #endif