1 //===-- Analysis.cpp ------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm-c/Analysis.h"
11 #include "llvm/Analysis/Verifier.h"
16 LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action,
20 LLVMBool Result = verifyModule(*unwrap(M),
21 static_cast<VerifierFailureAction>(Action),
22 OutMessages? &Messages : 0);
25 *OutMessages = strdup(Messages.c_str());
30 LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action) {
31 return verifyFunction(*unwrap<Function>(Fn),
32 static_cast<VerifierFailureAction>(Action));
35 void LLVMViewFunctionCFG(LLVMValueRef Fn) {
36 Function *F = unwrap<Function>(Fn);
40 void LLVMViewFunctionCFGOnly(LLVMValueRef Fn) {
41 Function *F = unwrap<Function>(Fn);