comparison tools/binding/llvm/c/BitReader.d @ 1273:1ba61de8796b

Committing LLVM binding for D as it currently exists in the SVN repository.
author Frits van Bommel <fvbommel wxs.nl>
date Mon, 27 Apr 2009 22:33:17 +0200
parents
children 29b0f2d11c92
comparison
equal deleted inserted replaced
1272:dd4766851b37 1273:1ba61de8796b
1 // Converted to the D programming language by Tomas Lindquist Olsen 2008
2 // Original file header:
3 /*===-- llvm-c/BitReader.h - BitReader Library C Interface ------*- C++ -*-===*\
4 |* *|
5 |* The LLVM Compiler Infrastructure *|
6 |* *|
7 |* This file is distributed under the University of Illinois Open Source *|
8 |* License. See LICENSE.TXT for details. *|
9 |* *|
10 |*===----------------------------------------------------------------------===*|
11 |* *|
12 |* This header declares the C interface to libLLVMBitReader.a, which *|
13 |* implements input of the LLVM bitcode format. *|
14 |* *|
15 |* Many exotic languages can interoperate with C code but have a harder time *|
16 |* with C++ due to name mangling. So in addition to C, this interface enables *|
17 |* tools written in such languages. *|
18 |* *|
19 \*===----------------------------------------------------------------------===*/
20
21 module llvm.c.BitReader;
22
23 import llvm.c.Core;
24
25 extern(C):
26
27 /* Builds a module from the bitcode in the specified memory buffer, returning a
28 reference to the module via the OutModule parameter. Returns 0 on success.
29 Optionally returns a human-readable error message via OutMessage. */
30 int LLVMParseBitcode(LLVMMemoryBufferRef MemBuf,
31 LLVMModuleRef *OutModule, char **OutMessage);
32
33 /* Reads a module from the specified path, returning via the OutMP parameter
34 a module provider which performs lazy deserialization. Returns 0 on success.
35 Optionally returns a human-readable error message via OutMessage. */
36 int LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf,
37 LLVMModuleProviderRef *OutMP,
38 char **OutMessage);