1 //===-- llvm/Analysis/Verifier.h - Module Verifier --------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the function verifier interface, that can be used for some
11 // sanity checking of input to the system, and for checking that transformations
12 // haven't done something bad.
14 // Note that this does not provide full 'java style' security and verifications,
15 // instead it just tries to ensure that code is well formed.
17 // To see what specifically is checked, look at the top of Verifier.cpp
19 //===----------------------------------------------------------------------===//
21 #ifndef LLVM_ANALYSIS_VERIFIER_H
22 #define LLVM_ANALYSIS_VERIFIER_H
30 // createVerifierPass - Check a module or function for validity. If errors are
31 // detected, error messages corresponding to the problem are printed to stderr.
33 FunctionPass *createVerifierPass();
35 // verifyModule - Check a module for errors, printing messages on stderr.
36 // Return true if the module is corrupt. This should only be used for
37 // debugging, because it plays games with PassManagers and stuff.
39 bool verifyModule(const Module &M);
41 // verifyFunction - Check a function for errors, useful for use when debugging a
43 bool verifyFunction(const Function &F);
45 } // End llvm namespace