llvm-project
829e2a55 - [libc][hdrgen] Allow to treat hdrgen Python code as a Python module. (#128955)

Commit
284 days ago
[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.
Author
Parents
Loading