summaryrefslogtreecommitdiff
path: root/include/llvm/BasicBlock.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
committerChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
commitb00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace (patch)
tree44b5f879c16e7ecb2e9334ad120e3454270e1bb3 /include/llvm/BasicBlock.h
parent1d87bcf4909b06dcd86320722653341f08b8b396 (diff)
downloadllvm-b00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace.tar.gz
llvm-b00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace.tar.bz2
llvm-b00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace.tar.xz
Commit more code over to new cast style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/BasicBlock.h')
-rw-r--r--include/llvm/BasicBlock.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h
index 1d1623bf97..cf29cbd00e 100644
--- a/include/llvm/BasicBlock.h
+++ b/include/llvm/BasicBlock.h
@@ -110,8 +110,8 @@ public:
InstListType &getInstList() { return InstList; }
// Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool isa(const BasicBlock *BB) { return true; }
- static inline bool isa(const Value *V) {
+ static inline bool classof(const BasicBlock *BB) { return true; }
+ static inline bool classof(const Value *V) {
return V->getValueType() == Value::BasicBlockVal;
}
@@ -168,9 +168,7 @@ public:
inline void advancePastConstPool() {
// TODO: This is bad
// Loop to ignore constant pool references
- while (It != BB->use_end() &&
- (((*It)->getValueType() != Value::InstructionVal) ||
- !(((Instruction*)(*It))->isTerminator())))
+ while (It != BB->use_end() && !isa<TerminatorInst>(*It))
++It;
}