[all-commits] [llvm/llvm-project] 2157ae: [libc] Produce standard-compliant header guard mac...

Roland McGrath via All-commits all-commits at lists.llvm.org
Sat Feb 15 17:37:05 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2157aecfe429f763c23d0ec8a59b896799e2d031
      https://github.com/llvm/llvm-project/commit/2157aecfe429f763c23d0ec8a59b896799e2d031
  Author: Roland McGrath <mcgrathr at google.com>
  Date:   2025-02-15 (Sat, 15 Feb 2025)

  Changed paths:
    M libc/include/__llvm-libc-common.h
    M libc/utils/hdrgen/header.py
    M libc/utils/hdrgen/tests/expected_output/subdir/test.h

  Log Message:
  -----------
  [libc] Produce standard-compliant header guard macros in hdrgen (#127356)

Macros starting with alphabetic characters such as "LLVM" are in
the application name space and cannot be defined or used by a
conforming implementation's headers.  This fixes the headers that
are entirely generated, and the __llvm-libc-common.h header to
use a conforming macro name for the header guard.  That is, it
starts with "_LLVM_LIBC_" instead of "LLVM_LIBC_", as identifiers
starting with an underscore followed by a capital letter are in
the name space reserved for the implementation.

The remaining headers either will be fixed implicitly by removal
of their custom template files, or will need to be fixed by hand.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list