COFF_x86_64.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===--- COFF_x86_64.h - JIT link functions for COFF/x86-64 ---*- 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. // jit-link functions for COFF/x86-64.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_EXECUTIONENGINE_JITLINK_COFF_X86_64_H
  18. #define LLVM_EXECUTIONENGINE_JITLINK_COFF_X86_64_H
  19. #include "llvm/ExecutionEngine/JITLink/JITLink.h"
  20. namespace llvm {
  21. namespace jitlink {
  22. /// Create a LinkGraph from an COFF/x86-64 relocatable object.
  23. ///
  24. /// Note: The graph does not take ownership of the underlying buffer, nor copy
  25. /// its contents. The caller is responsible for ensuring that the object buffer
  26. /// outlives the graph.
  27. Expected<std::unique_ptr<LinkGraph>>
  28. createLinkGraphFromCOFFObject_x86_64(MemoryBufferRef ObjectBuffer);
  29. /// jit-link the given object buffer, which must be a COFF x86-64 object file.
  30. void link_COFF_x86_64(std::unique_ptr<LinkGraph> G,
  31. std::unique_ptr<JITLinkContext> Ctx);
  32. /// Return the string name of the given COFF x86-64 edge kind.
  33. const char *getCOFFX86RelocationKindName(Edge::Kind R);
  34. } // end namespace jitlink
  35. } // end namespace llvm
  36. #endif // LLVM_EXECUTIONENGINE_JITLINK_COFF_X86_64_H
  37. #ifdef __GNUC__
  38. #pragma GCC diagnostic pop
  39. #endif