This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Split locale management out of locale_win32. NFCI
ClosedPublic

Authored by bcraig on Feb 18 2016, 2:54 PM.

Details

Summary

This is one part of many of a locale refactor. See
http://reviews.llvm.org/D17146 for an idea of where this is going.

For the locale refactor, the locale management functions (newlocale,
freelocale, uselocale) are needed in a separate header from the various _l
functions. This is because some platforms implement the _l functions in terms
of a locale switcher RAII helper, and the locale switcher RAII helper needs
the locale management functions. This patch helps pave the way by getting all
the functions in the right files, so that later diffs aren't completely
horrible.

Unfortunately, the Windows, Cygwin, and MinGW builds seemed to have bit-rotted, so I wasn't able to test this completely. I don't think I made things any worse than they already are though.

Diff Detail

Event Timeline

bcraig updated this revision to Diff 48409.Feb 18 2016, 2:54 PM
bcraig retitled this revision from to [libcxx] Split locale management out of locale_win32. NFCI.
bcraig updated this object.
bcraig added a subscriber: cfe-commits.
bcraig accepted this revision.Mar 9 2016, 7:56 AM
bcraig added a reviewer: bcraig.

Committed

This revision is now accepted and ready to land.Mar 9 2016, 7:56 AM
bcraig closed this revision.Mar 9 2016, 7:56 AM