https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286342

Jordan Gordeev <jgopensou...@proton.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #260449|0                           |1
        is obsolete|                            |

--- Comment #9 from Jordan Gordeev <jgopensou...@proton.me> ---
Created attachment 260505
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=260505&action=edit
Improved patch suitable for FreeBSD 14.3

I'm attaching a new patch. The improvement over the previous patch is that when
compiling without clang modules the change from the patch is negligible.

This patch is suitable for inclusion in FreeBSD 14.3 which is close to being
released.
It is also suitable for 15.0-CURRENT.

The patch relies on __has_feature(modules) compile-time check which can tell us
if we are compiling with clang modules or not. The check allows riskier changes
to be applied only for the case they are trying to fix ("with clang modules")
and leave the other case ("without clang modules") unaffected. Adding this kind
of check to libc++ code is not a big deal since there already is such a check
in /usr/include/c++/v1/__config. 

To validate the effect of the patch when compiling without clang modules,
compare the output of "clang++ -E demo.cpp" before and after applying the
patch. The only observable changes are some line numbers in locale_base_api.h
shifting slightly due to the addition of 6 extra lines.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to