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 | 7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8 (patch) | |
tree | fd083cad8506b9f54d19b8429dfae825f264c35b /lib/VMCore/InstrTypes.cpp | |
parent | 138a124f09de272b2ab93cfd6e2a8a283d18029b (diff) | |
download | llvm-7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8.tar.gz llvm-7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8.tar.bz2 llvm-7fc9fe34390c66ca58646d09a87f7dbaacb6c1f8.tar.xz |
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/InstrTypes.cpp')
-rw-r--r-- | lib/VMCore/InstrTypes.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/VMCore/InstrTypes.cpp b/lib/VMCore/InstrTypes.cpp index 142019b93d..baafe0bc13 100644 --- a/lib/VMCore/InstrTypes.cpp +++ b/lib/VMCore/InstrTypes.cpp @@ -68,8 +68,7 @@ bool PHINode::setOperand(unsigned i, Value *Val) { if (i >= IncomingValues.size()*2) return false; if (i & 1) { - assert(Val->getValueType() == BasicBlockVal && "Not a BB!"); - IncomingValues[i/2].second = (BasicBlock*)Val; + IncomingValues[i/2].second = Val->castBasicBlockAsserting(); } else { IncomingValues[i/2].first = Val; } |