[llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp
Reid Spencer
reid at x10sys.com
Thu Feb 1 11:15:10 PST 2007
Changes in directory llvm/lib/Transforms:
ExprTypeConvert.cpp updated: 1.122 -> 1.123
---
Log message:
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.
---
Diffs of the changes: (+3 -1)
ExprTypeConvert.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/ExprTypeConvert.cpp
diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.122 llvm/lib/Transforms/ExprTypeConvert.cpp:1.123
--- llvm/lib/Transforms/ExprTypeConvert.cpp:1.122 Sat Jan 20 18:29:25 2007
+++ llvm/lib/Transforms/ExprTypeConvert.cpp Thu Feb 1 13:14:51 2007
@@ -697,7 +697,7 @@
assert(BB != 0 && "Instruction not embedded in basic block!");
std::string Name = I->getName();
I->setName("");
- Instruction *Res; // Result of conversion
+ Instruction *Res = 0; // Result of conversion
//cerr << endl << endl << "Type:\t" << Ty << "\nInst: " << I
// << "BB Before: " << BB << endl;
@@ -917,6 +917,8 @@
return;
}
+ assert(Res != 0 && "We didn't get a result conversion?");
+
// If the instruction was newly created, insert it into the instruction
// stream.
//
More information about the llvm-commits
mailing list