diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-27 23:41:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-27 23:41:11 +0000 |
commit | 7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8 (patch) | |
tree | fd083cad8506b9f54d19b8429dfae825f264c35b /lib/VMCore/Verifier.cpp | |
parent | 138a124f09de272b2ab93cfd6e2a8a283d18029b (diff) |
Miscellaneous cleanups:
* Convert post to pre-increment for for loops
* Use generic programming more
* Use new Value::cast* instructions
* Use new Module, Method, & BasicBlock forwarding methods
* Use new facilities in STLExtras.h
* Use new Instruction::isPHINode() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 820fa5cb12..5b6654d6e0 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -71,10 +71,9 @@ static bool verify(const BasicBlock *BB, vector<string> &ErrorMsgs) { bool verify(const Method *M, vector<string> &ErrorMsgs) { bool Bad = false; - for (Method::BasicBlocksType::const_iterator BBIt = M->getBasicBlocks().begin(); - BBIt != M->getBasicBlocks().end(); BBIt++) { + for (Method::const_iterator BBIt = M->begin(); + BBIt != M->end(); ++BBIt) Bad |= verify(*BBIt, ErrorMsgs); - } return Bad; } @@ -84,11 +83,8 @@ bool verify(const Module *C, vector<string> &ErrorMsgs) { assert(Type::FirstDerivedTyID-1 < sizeof(long)*8 && "Resize ValidTypes table to handle more than 32 primitive types!"); - for (Module::MethodListType::const_iterator MI = C->getMethodList().begin(); - MI != C->getMethodList().end(); MI++) { - const Method *M = *MI; - Bad |= verify(M, ErrorMsgs); - } + for (Module::const_iterator MI = C->begin(); MI != C->end(); ++MI) + Bad |= verify(*MI, ErrorMsgs); return Bad; } |