IRReader.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*===-- llvm-c/IRReader.h - IR Reader C Interface -----------------*- C -*-===*\
  2. |* *|
  3. |* The LLVM Compiler Infrastructure *|
  4. |* *|
  5. |* This file is distributed under the University of Illinois Open Source *|
  6. |* License. See LICENSE.TXT for details. *|
  7. |* *|
  8. |*===----------------------------------------------------------------------===*|
  9. |* *|
  10. |* This file defines the C interface to the IR Reader. *|
  11. |* *|
  12. \*===----------------------------------------------------------------------===*/
  13. #ifndef LLVM_C_IRREADER_H
  14. #define LLVM_C_IRREADER_H
  15. #include "llvm-c/Core.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /**
  20. * Read LLVM IR from a memory buffer and convert it into an in-memory Module
  21. * object. Returns 0 on success.
  22. * Optionally returns a human-readable description of any errors that
  23. * occurred during parsing IR. OutMessage must be disposed with
  24. * LLVMDisposeMessage.
  25. *
  26. * @see llvm::ParseIR()
  27. */
  28. LLVMBool LLVMParseIRInContext(LLVMContextRef ContextRef,
  29. LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,
  30. char **OutMessage);
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif