Fix iterator invalidation problem with cast instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-04-23 17:57:48 +00:00
parent 548f61d66a
commit 3907d11200
2 changed files with 2 additions and 2 deletions

View File

@ -1401,7 +1401,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
MachineBasicBlock::iterator &IP,
Value *Src, const Type *DestTy,
unsigned DestReg) {
unsigned SrcReg = getReg(Src);
unsigned SrcReg = getReg(Src, BB, IP);
const Type *SrcTy = Src->getType();
unsigned SrcClass = getClassB(SrcTy);
unsigned DestClass = getClassB(DestTy);

View File

@ -1401,7 +1401,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
MachineBasicBlock::iterator &IP,
Value *Src, const Type *DestTy,
unsigned DestReg) {
unsigned SrcReg = getReg(Src);
unsigned SrcReg = getReg(Src, BB, IP);
const Type *SrcTy = Src->getType();
unsigned SrcClass = getClassB(SrcTy);
unsigned DestClass = getClassB(DestTy);