IRReader.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. /*===-- llvm-c/IRReader.h - IR Reader C Interface -----------------*- C -*-===*\
  7. |* *|
  8. |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
  9. |* Exceptions. *|
  10. |* See https://llvm.org/LICENSE.txt for license information. *|
  11. |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
  12. |* *|
  13. |*===----------------------------------------------------------------------===*|
  14. |* *|
  15. |* This file defines the C interface to the IR Reader. *|
  16. |* *|
  17. \*===----------------------------------------------------------------------===*/
  18. #ifndef LLVM_C_IRREADER_H
  19. #define LLVM_C_IRREADER_H
  20. #include "llvm-c/ExternC.h"
  21. #include "llvm-c/Types.h"
  22. LLVM_C_EXTERN_C_BEGIN
  23. /**
  24. * @defgroup LLVMCCoreIRReader IR Reader
  25. * @ingroup LLVMCCore
  26. *
  27. * @{
  28. */
  29. /**
  30. * Read LLVM IR from a memory buffer and convert it into an in-memory Module
  31. * object. Returns 0 on success.
  32. * Optionally returns a human-readable description of any errors that
  33. * occurred during parsing IR. OutMessage must be disposed with
  34. * LLVMDisposeMessage.
  35. *
  36. * @see llvm::ParseIR()
  37. */
  38. LLVMBool LLVMParseIRInContext(LLVMContextRef ContextRef,
  39. LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,
  40. char **OutMessage);
  41. /**
  42. * @}
  43. */
  44. LLVM_C_EXTERN_C_END
  45. #endif
  46. #ifdef __GNUC__
  47. #pragma GCC diagnostic pop
  48. #endif