[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp

Chris Lattner clattner at apple.com
Mon Dec 11 15:23:48 PST 2006


> 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?

-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 at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list