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
This commit is contained in:
Chris Lattner
2001-06-27 23:41:11 +00:00
parent 138a124f09
commit 7fc9fe3439
28 changed files with 230 additions and 207 deletions

View File

@ -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;
}