aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/BasicBlock.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/BasicBlock.cpp
parent138a124f09de272b2ab93cfd6e2a8a283d18029b (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/BasicBlock.cpp')
-rw-r--r--lib/VMCore/BasicBlock.cpp6
1 files changed, 3 insertions, 3 deletions
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.