forked from OSchip/llvm-project
Ensure that ConvertOperandToType generates a result conversion by
initializing the Res variable to 0 and asserting it is not zero after the result should have been created. llvm-svn: 33761
This commit is contained in:
parent
ce494229a1
commit
26c642de74
|
@ -697,7 +697,7 @@ static void ConvertOperandToType(User *U, Value *OldVal, Value *NewVal,
|
||||||
assert(BB != 0 && "Instruction not embedded in basic block!");
|
assert(BB != 0 && "Instruction not embedded in basic block!");
|
||||||
std::string Name = I->getName();
|
std::string Name = I->getName();
|
||||||
I->setName("");
|
I->setName("");
|
||||||
Instruction *Res; // Result of conversion
|
Instruction *Res = 0; // Result of conversion
|
||||||
|
|
||||||
//cerr << endl << endl << "Type:\t" << Ty << "\nInst: " << I
|
//cerr << endl << endl << "Type:\t" << Ty << "\nInst: " << I
|
||||||
// << "BB Before: " << BB << endl;
|
// << "BB Before: " << BB << endl;
|
||||||
|
@ -917,6 +917,8 @@ static void ConvertOperandToType(User *U, Value *OldVal, Value *NewVal,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(Res != 0 && "We didn't get a result conversion?");
|
||||||
|
|
||||||
// If the instruction was newly created, insert it into the instruction
|
// If the instruction was newly created, insert it into the instruction
|
||||||
// stream.
|
// stream.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue