[libc++] Speed up certain locale functions on Windows
authorThomas Anderson <thomasanderson@google.com>
Tue, 19 Mar 2019 20:30:58 +0000 (20:30 +0000)
committerThomas Anderson <thomasanderson@google.com>
Tue, 19 Mar 2019 20:30:58 +0000 (20:30 +0000)
commita0feccdf5692389920206444aea6b34105554c7f
tree2b7c6c4d5c5d57369df298c33206dec634bf6e97
parentde548ccab9f1dfdefff338754fbc151f4b5cee46
[libc++] Speed up certain locale functions on Windows

The issue is that __libcpp_locale_guard makes some slow calls to setlocale().
This change avoids using __libcpp_locale_guard in snprintf_l().

Fixes https://bugs.llvm.org/show_bug.cgi?id=41131

Differential Revision: https://reviews.llvm.org/D59525

llvm-svn: 356512
libcxx/src/support/win32/locale_win32.cpp