LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BitReader.h
Go to the documentation of this file.
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 
19 #ifndef LLVM_C_BITCODEREADER_H
20 #define LLVM_C_BITCODEREADER_H
21 
22 #include "llvm-c/Core.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /**
29  * @defgroup LLVMCBitReader Bit Reader
30  * @ingroup LLVMC
31  *
32  * @{
33  */
34 
35 /* Builds a module from the bitcode in the specified memory buffer, returning a
36  reference to the module via the OutModule parameter. Returns 0 on success.
37  Optionally returns a human-readable error message via OutMessage. */
39  LLVMModuleRef *OutModule, char **OutMessage);
40 
42  LLVMMemoryBufferRef MemBuf,
43  LLVMModuleRef *OutModule, char **OutMessage);
44 
45 /** Reads a module from the specified path, returning via the OutMP parameter
46  a module provider which performs lazy deserialization. Returns 0 on success.
47  Optionally returns a human-readable error message via OutMessage. */
49  LLVMMemoryBufferRef MemBuf,
50  LLVMModuleRef *OutM,
51  char **OutMessage);
52 
54  char **OutMessage);
55 
56 
57 /** Deprecated: Use LLVMGetBitcodeModuleInContext instead. */
59  LLVMMemoryBufferRef MemBuf,
60  LLVMModuleProviderRef *OutMP,
61  char **OutMessage);
62 
63 /** Deprecated: Use LLVMGetBitcodeModule instead. */
65  LLVMModuleProviderRef *OutMP,
66  char **OutMessage);
67 
68 /**
69  * @}
70  */
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif
int LLVMBool
Definition: Core.h:65
LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage)
Definition: BitReader.cpp:23
LLVMBool LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef *OutMP, char **OutMessage)
Definition: BitReader.cpp:84
LLVMBool LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef *OutMP, char **OutMessage)
Definition: BitReader.cpp:74
struct LLVMOpaqueMemoryBuffer * LLVMMemoryBufferRef
Definition: Core.h:122
struct LLVMOpaqueModuleProvider * LLVMModuleProviderRef
Definition: Core.h:115
LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage)
Definition: BitReader.cpp:29
struct LLVMOpaqueContext * LLVMContextRef
Definition: Core.h:72
LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, char **OutMessage)
Definition: BitReader.cpp:67
LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, char **OutMessage)
Definition: BitReader.cpp:49
struct LLVMOpaqueModule * LLVMModuleRef
Definition: Core.h:80