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
28 // createVerifierPass - Check a module or function for validity. If errors are
29 // detected, error messages corresponding to the problem are printed to stderr.
31 FunctionPass *createVerifierPass();
33 // verifyModule - Check a module for errors, printing messages on stderr.
34 // Return true if the module is corrupt. This should only be used for
35 // debugging, because it plays games with PassManagers and stuff.
37 bool verifyModule(const Module &M);
39 // verifyFunction - Check a function for errors, useful for use when debugging a
41 bool verifyFunction(const Function &F);