diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-11-13 21:56:09 +0000 | 
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-11-13 21:56:09 +0000 | 
| commit | 27440e71fc2fbe0337e1554a9c0a52352f3a31d0 (patch) | |
| tree | 62d03f698d6e3748c8767834694fbf268bd92d5e | |
| parent | ff0302489b7c57af268e238cc93f8b9ee239a8e5 (diff) | |
| download | bcm5719-llvm-27440e71fc2fbe0337e1554a9c0a52352f3a31d0.tar.gz bcm5719-llvm-27440e71fc2fbe0337e1554a9c0a52352f3a31d0.zip  | |
Add MachineFunction::verify() to call the machine code verifier directly.
llvm-svn: 88706
| -rw-r--r-- | llvm/include/llvm/CodeGen/MachineFunction.h | 4 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 4 | 
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h index e836e2ef15b..d05d994f0cc 100644 --- a/llvm/include/llvm/CodeGen/MachineFunction.h +++ b/llvm/include/llvm/CodeGen/MachineFunction.h @@ -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; diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index c056d1c7e5a..be9f68f6a72 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -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) {  | 

