[all-commits] [llvm/llvm-project] 68dba7: [libc++] Unbreak the debug mode

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Jan 19 11:15:52 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 68dba7eae1df333738d1c77cbbefd480995c1972
      https://github.com/llvm/llvm-project/commit/68dba7eae1df333738d1c77cbbefd480995c1972
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M libcxx/include/__config
    M libcxx/include/__locale
    M libcxx/include/locale
    A libcxx/test/libcxx/debug/extern-templates.sh.cpp

  Log Message:
  -----------
  [libc++] Unbreak the debug mode

When the Debug mode is enabled, we disable extern declarations because we
don't want to use the functions compiled in the library, which might not
have had the debug mode enabled when built. However, some extern declarations
need to be kept, because code correctness depends on it.

31e820378b8a removed those declarations, which had the unintended
consequence of breaking the debug build. This commit fixes that by
re-introducing a separate macro for the required extern declarations,
and adds a comment so that we don't fall into that trap in the future.

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




More information about the All-commits mailing list