00001 //===-- llvm/Analysis/Verifier.h - Module Verifier --------------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines the function verifier interface, that can be used for some 00011 // sanity checking of input to the system, and for checking that transformations 00012 // haven't done something bad. 00013 // 00014 // Note that this does not provide full 'java style' security and verifications, 00015 // instead it just tries to ensure that code is well formed. 00016 // 00017 // To see what specifically is checked, look at the top of Verifier.cpp 00018 // 00019 //===----------------------------------------------------------------------===// 00020 00021 #ifndef LLVM_ANALYSIS_VERIFIER_H 00022 #define LLVM_ANALYSIS_VERIFIER_H 00023 00024 #include <string> 00025 00026 namespace llvm { 00027 00028 class FunctionPass; 00029 class Module; 00030 class Function; 00031 00038 enum VerifierFailureAction { 00039 AbortProcessAction, 00040 PrintMessageAction, 00041 ReturnStatusAction 00042 }; 00043 00049 FunctionPass *createVerifierPass( 00050 VerifierFailureAction action = AbortProcessAction 00051 ); 00052 00059 00060 bool verifyModule( 00061 const Module &M, 00062 VerifierFailureAction action = AbortProcessAction, 00063 std::string *ErrorInfo = 0 00064 ); 00065 00066 // verifyFunction - Check a function for errors, useful for use when debugging a 00067 // pass. 00068 bool verifyFunction( 00069 const Function &F, 00070 VerifierFailureAction action = AbortProcessAction 00071 ); 00072 00073 } // End llvm namespace 00074 00075 #endif
1.5.8