Page MenuHomePhabricator

Always print doubles with the C locale
AbandonedPublic

Authored by nhaehnle on Sep 28 2016, 6:12 AM.

Details

Reviewers
chandlerc
chapuni
Summary

This fixes a problem where AsmWriter asserts or produces invalid textual IR
when the locale is set such that ',' is used for the decimal point.

The reliance on C++ streams is perhaps annoying, but I see no other way
short of importing a whole double-to-string routine. Having the user change
the locale certainly isn't an option because this occurs in a context where
LLVM is embedded in a larger application.

Diff Detail

Event Timeline

nhaehnle updated this revision to Diff 72814.Sep 28 2016, 6:12 AM
nhaehnle retitled this revision from to Always print doubles with the C locale.
nhaehnle updated this object.
nhaehnle added reviewers: chandlerc, chapuni.
nhaehnle added a subscriber: llvm-commits.
nhaehnle abandoned this revision.Feb 21 2018, 6:54 AM