Wind these directories back too. File adds and removes are properly represented
[llvm.git] / include / llvm-c / BitReader.h
blob6db66074b31ace65eb0914683abaeace6336f086
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 \*===----------------------------------------------------------------------===*/
19 #ifndef LLVM_C_BITCODEREADER_H
20 #define LLVM_C_BITCODEREADER_H
22 #include "llvm-c/Core.h"
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
29 /* Builds a module from the bitcode in the specified memory buffer, returning a
30 reference to the module via the OutModule parameter. Returns 0 on success.
31 Optionally returns a human-readable error message via OutMessage. */
32 LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf,
33 LLVMModuleRef *OutModule, char **OutMessage);
35 LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef,
36 LLVMMemoryBufferRef MemBuf,
37 LLVMModuleRef *OutModule, char **OutMessage);
39 /** Reads a module from the specified path, returning via the OutMP parameter
40 a module provider which performs lazy deserialization. Returns 0 on success.
41 Optionally returns a human-readable error message via OutMessage. */
42 LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef,
43 LLVMMemoryBufferRef MemBuf,
44 LLVMModuleRef *OutM,
45 char **OutMessage);
47 LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,
48 char **OutMessage);
51 /** Deprecated: Use LLVMGetBitcodeModuleInContext instead. */
52 LLVMBool LLVMGetBitcodeModuleProviderInContext(LLVMContextRef ContextRef,
53 LLVMMemoryBufferRef MemBuf,
54 LLVMModuleProviderRef *OutMP,
55 char **OutMessage);
57 /** Deprecated: Use LLVMGetBitcodeModule instead. */
58 LLVMBool LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf,
59 LLVMModuleProviderRef *OutMP,
60 char **OutMessage);
62 #ifdef __cplusplus
64 #endif
66 #endif