X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm-c%2FAnalysis.h;h=f0bdddc50ab76385bcb8044a25d508d8e4ff74e8;hb=4cb59148f0f2078e6ea0eb76958164a552364ed1;hp=b57577b05886de0facbdca603edee36ea481fab4;hpb=c0491ac8b6c24a7d0db8c0a60f76cfb1d66f84ab;p=oota-llvm.git diff --git a/include/llvm-c/Analysis.h b/include/llvm-c/Analysis.h index b57577b0588..f0bdddc50ab 100644 --- a/include/llvm-c/Analysis.h +++ b/include/llvm-c/Analysis.h @@ -2,8 +2,8 @@ |* *| |* The LLVM Compiler Infrastructure *| |* *| -|* This file was developed by Gordon Henriksen and is distributed under the *| -|* University of Illinois Open Source License. See LICENSE.TXT for details. *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| |* *| |*===----------------------------------------------------------------------===*| |* *| @@ -25,6 +25,12 @@ extern "C" { #endif +/** + * @defgroup LLVMCAnalysis Analysis + * @ingroup LLVMC + * + * @{ + */ typedef enum { LLVMAbortProcessAction, /* verifier will print to stderr and abort() */ @@ -34,17 +40,23 @@ typedef enum { /* Verifies that a module is valid, taking the specified action if not. - Optionally returns a human-readable description of any invalid constructs. */ -int LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, - char **OutMessage); - -/* Disposes of the message allocated by the verifier, if any. */ -void LLVMDisposeVerifierMessage(char *Message); + Optionally returns a human-readable description of any invalid constructs. + OutMessage must be disposed with LLVMDisposeMessage. */ +LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, + char **OutMessage); /* Verifies that a single function is valid, taking the specified action. Useful for debugging. */ -int LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action); +LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action); + +/* Open up a ghostview window that displays the CFG of the current function. + Useful for debugging. */ +void LLVMViewFunctionCFG(LLVMValueRef Fn); +void LLVMViewFunctionCFGOnly(LLVMValueRef Fn); +/** + * @} + */ #ifdef __cplusplus }