LLVM  6.0.0svn
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_BITREADER_H
20 #define LLVM_C_BITREADER_H
21 
22 #include "llvm-c/Types.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.
38 
39  This is deprecated. Use LLVMParseBitcode2. */
41  char **OutMessage);
42 
43 /* Builds a module from the bitcode in the specified memory buffer, returning a
44  reference to the module via the OutModule parameter. Returns 0 on success. */
46  LLVMModuleRef *OutModule);
47 
48 /* This is deprecated. Use LLVMParseBitcodeInContext2. */
50  LLVMMemoryBufferRef MemBuf,
51  LLVMModuleRef *OutModule, char **OutMessage);
52 
54  LLVMMemoryBufferRef MemBuf,
55  LLVMModuleRef *OutModule);
56 
57 /** Reads a module from the specified path, returning via the OutMP parameter
58  a module provider which performs lazy deserialization. Returns 0 on success.
59  Optionally returns a human-readable error message via OutMessage.
60  This is deprecated. Use LLVMGetBitcodeModuleInContext2. */
62  LLVMMemoryBufferRef MemBuf,
63  LLVMModuleRef *OutM, char **OutMessage);
64 
65 /** Reads a module from the specified path, returning via the OutMP parameter a
66  * module provider which performs lazy deserialization. Returns 0 on success. */
68  LLVMMemoryBufferRef MemBuf,
69  LLVMModuleRef *OutM);
70 
71 /* This is deprecated. Use LLVMGetBitcodeModule2. */
73  char **OutMessage);
74 
76 
77 /**
78  * @}
79  */
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
Definition: Types.h:62
struct LLVMOpaqueMemoryBuffer * LLVMMemoryBufferRef
LLVM uses a polymorphic type hierarchy which C cannot represent, therefore parameters must be passed ...
Definition: Types.h:49
LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage)
Definition: BitReader.cpp:26
LLVMBool LLVMParseBitcodeInContext2(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule)
Definition: BitReader.cpp:60
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
Definition: Types.h:54
LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage)
Definition: BitReader.cpp:37
LLVMBool LLVMGetBitcodeModuleInContext2(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM)
Reads a module from the specified path, returning via the OutMP parameter a module provider which per...
Definition: BitReader.cpp:107
LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, char **OutMessage)
Definition: BitReader.cpp:126
int LLVMBool
Definition: Types.h:29
LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule)
Definition: BitReader.cpp:32
LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, char **OutMessage)
Reads a module from the specified path, returning via the OutMP parameter a module provider which per...
Definition: BitReader.cpp:80
LLVMBool LLVMGetBitcodeModule2(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM)
Definition: BitReader.cpp:132