ELF_loongarch.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===-- ELF_loongarch.h - JIT link functions for ELF/loongarch -*- 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/loongarch.
  17. //
  18. //===----------------------------------------------------------------------===//
  19. #ifndef LLVM_EXECUTIONENGINE_JITLINK_ELF_LOONGARCH_H
  20. #define LLVM_EXECUTIONENGINE_JITLINK_ELF_LOONGARCH_H
  21. #include "llvm/ExecutionEngine/JITLink/JITLink.h"
  22. namespace llvm {
  23. namespace jitlink {
  24. /// Create a LinkGraph from an ELF/loongarch 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_loongarch(MemoryBufferRef ObjectBuffer);
  31. /// jit-link the given object buffer, which must be an ELF loongarch object
  32. /// file.
  33. void link_ELF_loongarch(std::unique_ptr<LinkGraph> G,
  34. std::unique_ptr<JITLinkContext> Ctx);
  35. } // end namespace jitlink
  36. } // end namespace llvm
  37. #endif // LLVM_EXECUTIONENGINE_JITLINK_ELF_LOONGARCH_H
  38. #ifdef __GNUC__
  39. #pragma GCC diagnostic pop
  40. #endif