[all-commits] [llvm/llvm-project] f88336: [libc] fix stdbit include test when not all entryp...

Nick Desaulniers via All-commits all-commits at lists.llvm.org
Thu Feb 1 12:08:12 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f883365cc7600cf1c29b36343f2f8cdbe3394881
      https://github.com/llvm/llvm-project/commit/f883365cc7600cf1c29b36343f2f8cdbe3394881
  Author: Nick Desaulniers <nickdesaulniers at users.noreply.github.com>
  Date:   2024-02-01 (Thu, 01 Feb 2024)

  Changed paths:
    M libc/test/include/stdbit_test.cpp

  Log Message:
  -----------
  [libc] fix stdbit include test when not all entrypoints are available (#80323)

The intent of the test is to check that: 1. The type generic macros are
defined. 2. Those macros dispatch to the correct underlying function.

The issue is that when new functionality is added to our stdbit.h without
rolling out the new entrypoint to all targets, this test breaks because our
generated stdbit.h will not contain declarations for the underlying function.
In that case, we should just declare the underlying functions first before
including our generated stdbit.h which just contains declarations. A definition
is a declaration, but redeclarations must match, hence the additions of
noexcept and extern "C".




More information about the All-commits mailing list