Mercurial > projects > ldc
comparison tools/binding/llvm/c/Analysis.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 |
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/Analysis.h - Analysis 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 libLLVMAnalysis.a, which *| | |
13 |* implements various analyses of the LLVM IR. *| | |
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.Analysis; | |
22 | |
23 import llvm.c.Core; | |
24 | |
25 extern(C): | |
26 | |
27 enum LLVMVerifierFailureAction { | |
28 AbortProcess, /* verifier will print to stderr and abort() */ | |
29 PrintMessage, /* verifier will print to stderr and return 1 */ | |
30 ReturnStatus /* verifier will just return 1 */ | |
31 } | |
32 | |
33 | |
34 /* Verifies that a module is valid, taking the specified action if not. | |
35 Optionally returns a human-readable description of any invalid constructs. | |
36 OutMessage must be disposed with LLVMDisposeMessage. */ | |
37 int LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, | |
38 char **OutMessage); | |
39 | |
40 /* Verifies that a single function is valid, taking the specified action. Useful | |
41 for debugging. */ | |
42 int LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action); |