On Mon, 2006-12-11 at 15:23 -0800, Chris Lattner wrote: > > Create the cast constant expression that was read instead of > > attempting > > to infer the cast from its operand and type. This fixes: > > test/Regression/Bytecode/2006-12-11-Cast-ConstExpr.ll > > Is there any hope that that getCast method will go away soon?
My focus this week is cleanup. I'm starting with the 63 getCast calls. This was the first. I'm about to commit CodeGen/AsmPrinter.cpp. Next up is createInferredCast. Then I'll be looking for useless bitcasts, and etc. Reid > > -Chris > > > > > --- > > Diffs of the changes: (+2 -1) > > > > Reader.cpp | 3 ++- > > 1 files changed, 2 insertions(+), 1 deletion(-) > > > > > > Index: llvm/lib/Bytecode/Reader/Reader.cpp > > diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.212 llvm/lib/Bytecode/ > > Reader/Reader.cpp:1.213 > > --- llvm/lib/Bytecode/Reader/Reader.cpp:1.212 Fri Dec 8 12:06:15 2006 > > +++ llvm/lib/Bytecode/Reader/Reader.cpp Mon Dec 11 17:20:20 2006 > > @@ -1325,7 +1325,8 @@ > > if (!Instruction::isCast(Opcode)) > > error("Only cast instruction has one argument for > > ConstantExpr"); > > > > - Constant *Result = ConstantExpr::getCast(ArgVec[0], getType > > (TypeID)); > > + Constant *Result = ConstantExpr::getCast(Opcode, ArgVec[0], > > + getType(TypeID)); > > if (Handler) Handler->handleConstantExpression(Opcode, > > ArgVec, Result); > > return Result; > > } else if (Opcode == Instruction::GetElementPtr) { // > > GetElementPtr > > > > > > > > _______________________________________________ > > llvm-commits mailing list > > llvm-commits@cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits