[all-commits] [llvm/llvm-project] 675401: [libcxx] Avoid pulling in xlocinfo.h in public hea...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Mar 24 14:32:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 675401e04c0687693c3b869410ed575387e7d8d6
      https://github.com/llvm/llvm-project/commit/675401e04c0687693c3b869410ed575387e7d8d6
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-03-24 (Wed, 24 Mar 2021)

  Changed paths:
    M libcxx/include/__support/win32/locale_win32.h
    M libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp

  Log Message:
  -----------
  [libcxx] Avoid pulling in xlocinfo.h in public headers

Including xlocinfo.h is a bit of a layering violation; locale.h is
the C library header we should use, while xlocinfo.h is essentially
part of the MS C++ library. Including xlocinfo.h brings in yvals.h,
which brings in yvals_core.h, which defines the MS STL's version
support macros, overriding what libc++'s <version> had defined.

Instead just include locale.h, and provide the few defines we need
for locale categories manually.

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




More information about the All-commits mailing list