Commit Graph

6 Commits

Author SHA1 Message Date
Louis Dionne
4e7ffcaae6 Revert "[libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY"
This reverts commit r336369. The commit had two problems:
1. __pbump was marked as _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY instead of
   _LIBCPP_INLINE_VISIBILITY, which lead to two symbols being added in the
   dylib and the check-cxx-abilist failing.

2. The LLDB tests started failing because they undefine
   `_LIBCPP_INLINE_VISIBILITY`. I need to figure out why they do that and
   fix the tests before we can go forward with this change.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336382 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-05 18:41:50 +00:00
Louis Dionne
79aa4f32d0 [libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY
Summary:
We never actually mean to always inline a function -- all the uses of
the macro I could find are actually attempts to control the visibility
of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which
is actually always defined the same.

This change is orthogonal to the decision of what we're actually going
to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by
having one canonical way of doing things.

Reviewers: EricWF

Subscribers: christof, llvm-commits, dexonsmith, erikvanderpoel, mclow.lists

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@336369 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-05 16:49:38 +00:00
Eric Fiselier
650a099d4b Add system header pragma to BSD locale fallback headers.
This prevent leaking warnings to the user about use of C++11
extensions in C++03.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@309917 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-03 02:50:43 +00:00
Marshall Clow
daea5bc508 Add missing include to __bsd_locale_fallbacks.h. Fixes https://bugs.llvm.org/show_bug.cgi?id=33370
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305469 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15 14:31:11 +00:00
Eric Fiselier
2ec6d3933a Refactor <locale> RAII guards to aid upcoming Windows locale changes.
Previously <locale> used std::unique_ptr<remove_ptr<locale_t>, locale-mgmt-function>
as a scope guard for (A) creating new locales, and (B) setting the thread specific locale
in RAII safe manner.

However using unique_ptr has some problems, first it requires that locale_t is a pointer
type, which may not be the case (Windows will need a non-pointer locale_t type that emulates _locale_t).

The second problem is that users of the guards had to supply the locale management function to the custom
deleter at every call site. However these locale management functions don't exist natively Windows, making
a good Windows implementation of locale more difficult.

This patch creates distinct and simply RAII guards that replace unique_ptr. These guards handle calling
the correct locale management function so that callers don't have too. This simplification will
aid in upcoming Windows fixes.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302474 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-08 22:02:43 +00:00
Ben Craig
fd556585b2 Reorganize _LIBCPP_LOCALE__L_EXTENSIONS
Instead of checking _LIBCPP_LOCALE_L_EXTENSIONS all over, instead check it
once, and define the various *_l symbols once. The private redirector symbol
names are all prefixed with _libcpp_* so that they won't conflict with user
symbols, and so they won't conflict with future C library symbols. In
particular, glibc likes providing private symbols such as __locale_t, so we
should follow a different naming pattern (like _libcpp_*) to avoid problems
on that front.

Tested on Linux with glibc. Hoping for the best on OSX and the various BSDs.

http://reviews.llvm.org/D17456


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@263016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09 15:39:39 +00:00