From c8839c8db07a85d0a338bd2c8cf849badd346e09 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 8 Mar 2019 23:59:29 +0000 Subject: [PATCH] Work around dllimport bug with exclude_from_explicit_instantiation. When dllimport is specified on a class, and exclude_from_explicit_instatiation is specified on a member, clang-cl will still expect a definition to be available externally. But this is not correct. Surprisingly one one symbol seems to be consistently affected by this bug. So this patch simply works around it there. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@355760 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__locale | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/__locale b/include/__locale index 0a275c07a..b79d78dda 100644 --- a/include/__locale +++ b/include/__locale @@ -254,7 +254,10 @@ public: return do_compare(__lo1, __hi1, __lo2, __hi2); } + // FIXME(EricWF): The _LIBCPP_ALWAYS_INLINE is needed on Windows to work + // around a dllimport bug that expects an external instantiation. _LIBCPP_INLINE_VISIBILITY + _LIBCPP_ALWAYS_INLINE string_type transform(const char_type* __lo, const char_type* __hi) const { return do_transform(__lo, __hi);