2003-09-30 18:37:50 +00:00
|
|
|
//===-- llvm/Analysis/Verifier.h - Module Verifier --------------*- C++ -*-===//
|
2003-10-20 20:19:47 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2001-06-06 20:29:01 +00:00
|
|
|
//
|
2002-04-14 06:14:15 +00:00
|
|
|
// This file defines the function verifier interface, that can be used for some
|
2002-08-30 22:51:08 +00:00
|
|
|
// sanity checking of input to the system, and for checking that transformations
|
|
|
|
// haven't done something bad.
|
2001-06-06 20:29:01 +00:00
|
|
|
//
|
|
|
|
// Note that this does not provide full 'java style' security and verifications,
|
|
|
|
// instead it just tries to ensure that code is well formed.
|
|
|
|
//
|
|
|
|
// To see what specifically is checked, look at the top of Verifier.cpp
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_ANALYSIS_VERIFIER_H
|
|
|
|
#define LLVM_ANALYSIS_VERIFIER_H
|
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-09-10 19:37:04 +00:00
|
|
|
class FunctionPass;
|
2001-06-06 20:29:01 +00:00
|
|
|
class Module;
|
2002-03-23 22:51:58 +00:00
|
|
|
class Function;
|
2001-06-06 20:29:01 +00:00
|
|
|
|
2002-04-14 06:14:15 +00:00
|
|
|
// createVerifierPass - Check a module or function for validity. If errors are
|
2002-02-20 17:54:35 +00:00
|
|
|
// detected, error messages corresponding to the problem are printed to stderr.
|
2001-06-06 20:29:01 +00:00
|
|
|
//
|
2003-09-10 19:37:04 +00:00
|
|
|
FunctionPass *createVerifierPass();
|
2002-02-20 17:54:35 +00:00
|
|
|
|
|
|
|
// verifyModule - Check a module for errors, printing messages on stderr.
|
2002-08-30 22:51:08 +00:00
|
|
|
// Return true if the module is corrupt. This should only be used for
|
|
|
|
// debugging, because it plays games with PassManagers and stuff.
|
2002-02-20 17:54:35 +00:00
|
|
|
//
|
2002-06-25 16:13:24 +00:00
|
|
|
bool verifyModule(const Module &M);
|
2002-02-26 21:38:48 +00:00
|
|
|
|
2002-04-14 06:14:15 +00:00
|
|
|
// verifyFunction - Check a function for errors, useful for use when debugging a
|
2002-02-26 21:38:48 +00:00
|
|
|
// pass.
|
2002-06-25 16:13:24 +00:00
|
|
|
bool verifyFunction(const Function &F);
|
2001-06-06 20:29:01 +00:00
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2001-06-06 20:29:01 +00:00
|
|
|
#endif
|