aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-06-27 23:41:11 +0000
committerChris Lattner <sabre@nondot.org>2001-06-27 23:41:11 +0000
commit7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8 (patch)
treefd083cad8506b9f54d19b8429dfae825f264c35b /lib/VMCore/Function.cpp
parent138a124f09de272b2ab93cfd6e2a8a283d18029b (diff)
downloadexternal_llvm-7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8.zip
external_llvm-7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8.tar.gz
external_llvm-7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8.tar.bz2
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/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 550c4f0..aa0d08b 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -29,8 +29,8 @@ Method::~Method() {
dropAllReferences(); // After this it is safe to delete instructions.
// TODO: Should remove from the end, not the beginning of vector!
- BasicBlocksType::iterator BI = BasicBlocks.begin();
- while ((BI = BasicBlocks.begin()) != BasicBlocks.end())
+ iterator BI = begin();
+ while ((BI = begin()) != end())
delete BasicBlocks.remove(BI);
// Delete all of the method arguments and unlink from symbol table...
@@ -70,6 +70,5 @@ const MethodType *Method::getMethodType() const {
// delete.
//
void Method::dropAllReferences() {
- for_each(BasicBlocks.begin(), BasicBlocks.end(),
- std::mem_fun(&BasicBlock::dropAllReferences));
+ for_each(begin(), end(), std::mem_fun(&BasicBlock::dropAllReferences));
}