[LLVMdev] regression? Or did I do something wrong again?

Hendrik Boom hendrik at topoi.pooq.com
Mon Jun 9 17:17:36 PDT 2008


On Mon, 09 Jun 2008 21:25:42 +0200, Matthijs Kooijman wrote:

> Hi Hendrik,
> 

> It seems the ConstantFP method get might have been modified to take a
> reference-to-APFloat, meaning you can't pass in APFloat(Value) anonymously.
> You should either put it in a local variable, like
> 	APFloat F(Val);
> 	return ConstantFP::get(Type::DoubleTy, F);
> which I _think_ is the right way to use the first get() function. Easier is to
> use the alternative get() function, which simply takes a double directly.
> i.e.,
> 	return ConstantFP::get(Type::DoubleTy, Val);
> 
> Could you please test both and report the results?
> 

Eli Friedman tells me that the specs for ConstantFP have changed.  In the
release notes it now tells us that the first argument has been dropped
entirely.

Given the change of spec, there isn't much point in doing your tests; but
removing the first argument from the offending call works wonders. 
Someone with write access should correct the tutorial!

-- hendrik




More information about the llvm-dev mailing list