From 7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 27 Jun 2001 23:41:11 +0000 Subject: 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 --- lib/VMCore/BasicBlock.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/VMCore/BasicBlock.cpp') diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index f60bd4686c..36ad93d477 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -73,7 +73,7 @@ void BasicBlock::dropAllReferences() { // bool BasicBlock::hasConstantPoolReferences() const { for (use_const_iterator I = use_begin(), E = use_end(); I != E; ++I) - if ((*I)->getValueType() == ConstantVal) + if ((*I)->isConstant()) return true; return false; @@ -91,7 +91,7 @@ bool BasicBlock::hasConstantPoolReferences() const { // cause a degenerate basic block to be formed, having a terminator inside of // the basic block). // -BasicBlock *BasicBlock::splitBasicBlock(InstListType::iterator I) { +BasicBlock *BasicBlock::splitBasicBlock(iterator I) { assert(getTerminator() && "Can't use splitBasicBlock on degenerate BB!"); assert(I != InstList.end() && "Trying to get me to create degenerate basic block!"); @@ -102,7 +102,7 @@ BasicBlock *BasicBlock::splitBasicBlock(InstListType::iterator I) { // to the new basic block... Instruction *Inst = 0; do { - InstListType::iterator EndIt = InstList.end(); + iterator EndIt = end(); Inst = InstList.remove(--EndIt); // Remove from end New->InstList.push_front(Inst); // Add to front } while (Inst != *I); // Loop until we move the specified instruction. -- cgit v1.2.3-18-g5258