Add MachineFunction::verify() to call the machine code verifier directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2009-11-13 21:56:09 +00:00
parent 52cd548525
commit ce727d0da0
2 changed files with 8 additions and 0 deletions

View File

@ -232,6 +232,10 @@ public:
///
void dump() const;
/// verify - Run the current MachineFunction through the machine code
/// verifier, useful for debugger use.
void verify() const;
// Provide accessors for the MachineBasicBlock list...
typedef BasicBlockListType::iterator iterator;
typedef BasicBlockListType::const_iterator const_iterator;

View File

@ -175,6 +175,10 @@ FunctionPass *llvm::createMachineVerifierPass(bool allowPhysDoubleDefs) {
return new MachineVerifier(allowPhysDoubleDefs);
}
void MachineFunction::verify() const {
MachineVerifier().runOnMachineFunction(const_cast<MachineFunction&>(*this));
}
bool MachineVerifier::runOnMachineFunction(MachineFunction &MF) {
raw_ostream *OutFile = 0;
if (OutFileName) {