Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.3 KiB

  1. /*===-- llvm-c/BitReader.h - BitReader Library 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 header declares the C interface to libLLVMBitReader.a, which *|
  11. |* implements input of the LLVM bitcode format. *|
  12. |* *|
  13. |* Many exotic languages can interoperate with C code but have a harder time *|
  14. |* with C++ due to name mangling. So in addition to C, this interface enables *|
  15. |* tools written in such languages. *|
  16. |* *|
  17. \*===----------------------------------------------------------------------===*/
  18. #ifndef LLVM_C_BITCODEREADER_H
  19. #define LLVM_C_BITCODEREADER_H
  20. #include "llvm-c/Core.h"
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /**
  25. * @defgroup LLVMCBitReader Bit Reader
  26. * @ingroup LLVMC
  27. *
  28. * @{
  29. */
  30. /* Builds a module from the bitcode in the specified memory buffer, returning a
  31. reference to the module via the OutModule parameter. Returns 0 on success.
  32. Optionally returns a human-readable error message via OutMessage. */
  33. LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf,
  34. LLVMModuleRef *OutModule, char **OutMessage);
  35. LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef,
  36. LLVMMemoryBufferRef MemBuf,
  37. LLVMModuleRef *OutModule, char **OutMessage);
  38. /** Reads a module from the specified path, returning via the OutMP parameter
  39. a module provider which performs lazy deserialization. Returns 0 on success.
  40. Optionally returns a human-readable error message via OutMessage. */
  41. LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef,
  42. LLVMMemoryBufferRef MemBuf,
  43. LLVMModuleRef *OutM,
  44. char **OutMessage);
  45. LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,
  46. char **OutMessage);
  47. /** Deprecated: Use LLVMGetBitcodeModuleInContext instead. */
  48. LLVMBool LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef,
  49. LLVMMemoryBufferRef MemBuf,
  50. LLVMModuleProviderRef *OutMP,
  51. char **OutMessage);
  52. /** Deprecated: Use LLVMGetBitcodeModule instead. */
  53. LLVMBool LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf,
  54. LLVMModuleProviderRef *OutMP,
  55. char **OutMessage);
  56. /**
  57. * @}
  58. */
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62. #endif