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 | 4cee8d8ffbdf355428c46dad34cbc4d2c70b6015 (patch) | |
tree | 31549814da047e6a706166197544f9e62449851c /llvm/lib/VMCore/Verifier.cpp | |
parent | 347389dae8f22da4ab7f4de8540bf121d30c1c1a (diff) | |
download | bcm5719-llvm-4cee8d8ffbdf355428c46dad34cbc4d2c70b6015.tar.gz bcm5719-llvm-4cee8d8ffbdf355428c46dad34cbc4d2c70b6015.zip |
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
llvm-svn: 96
Diffstat (limited to 'llvm/lib/VMCore/Verifier.cpp')
-rw-r--r-- | llvm/lib/VMCore/Verifier.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index 820fa5cb12d..5b6654d6e02 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/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; } |