[all-commits] [llvm/llvm-project] 829e2a: [libc][hdrgen] Allow to treat hdrgen Python code a...

Alexey Samsonov via All-commits all-commits at lists.llvm.org
Wed Feb 26 15:41:51 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 829e2a55261890e15102d978f714001a2d1acf85
      https://github.com/llvm/llvm-project/commit/829e2a55261890e15102d978f714001a2d1acf85
  Author: Alexey Samsonov <vonosmas at gmail.com>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M libc/docs/dev/header_generation.rst
    R libc/utils/hdrgen/enumeration.py
    R libc/utils/hdrgen/function.py
    R libc/utils/hdrgen/gpu_headers.py
    A libc/utils/hdrgen/hdrgen/__init__.py
    A libc/utils/hdrgen/hdrgen/enumeration.py
    A libc/utils/hdrgen/hdrgen/function.py
    A libc/utils/hdrgen/hdrgen/gpu_headers.py
    A libc/utils/hdrgen/hdrgen/header.py
    A libc/utils/hdrgen/hdrgen/macro.py
    A libc/utils/hdrgen/hdrgen/main.py
    A libc/utils/hdrgen/hdrgen/object.py
    A libc/utils/hdrgen/hdrgen/type.py
    A libc/utils/hdrgen/hdrgen/yaml_functions_sorted.py
    A libc/utils/hdrgen/hdrgen/yaml_to_classes.py
    R libc/utils/hdrgen/header.py
    R libc/utils/hdrgen/macro.py
    M libc/utils/hdrgen/main.py
    R libc/utils/hdrgen/object.py
    R libc/utils/hdrgen/type.py
    R libc/utils/hdrgen/yaml_functions_sorted.py
    M libc/utils/hdrgen/yaml_to_classes.py

  Log Message:
  -----------
  [libc][hdrgen] Allow to treat hdrgen Python code as a Python module. (#128955)

Move the hdrgen code under a subdirectory to treat it as a Python
module.

This mimics the structure used by llvm/utils/lit and
llvm/utils/mlgo-utils and simplifies integration of hdrgen to the build
system which rely on Python modules. In addition to that, it clarifies
which imports are coming from the hdrgen-specific helpers (e.g. "from
type import ..." becomes "from hdrgen.type import ...".

Leave the entrypoints (top-level main.py and yaml_to_classes.py) as-is:
they can keep being referred by the CMake build system w/o any changes.



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