[cfe-dev] FW: StmtPrinter long double support.
Jean-Daniel Dupas
devlists at shadowlab.org
Sat Jun 7 16:12:36 PDT 2008
Le 8 juin 08 à 00:14, Chris Lattner a écrit :
> On Jun 6, 2008, at 9:47 AM, Dale Johannesen wrote:
>>> I wonder what will be the best way to solve those both issue. Has
>>> somebody planned to add support for long double to APInt and
>>> APFloat ?
>>
>> There are no plans to support the use of host long double anywhere,
>> if that's what you mean.
>>
>> Probably this dumper should use APFloat::convert to get the long
>> double into APFloat::IEEEdouble format (with loss of precision; the
>> comment claims that's OK), then use convertToDouble on that. If you
>> want full precision, you'll need to print all the bits in hex; see
>> EmitGlobalConstant in AsmPrinter.cpp.
>>
>
> I implemented this, thanks Dale. As a note, the preferred list for
> clang discussion is on cfe-dev. No harm in using llvmdev though.
Sorry, I realised that this was not the best list afterward.
An other question about long double printing, shouldn't the printer
append a 'L' suffix to long double literal ? As the printer does not
output an exact value (due to the convertion to double), it will at
least helps to defined that the value was correctly interpreted as a
long double.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2427 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080608/846974f1/attachment.bin>
More information about the cfe-dev
mailing list