[libc-commits] [libc] [libc] Remove unnecessary subdirectory layers in utils/hdrgen (PR #121363)
Roland McGrath via libc-commits
libc-commits at lists.llvm.org
Mon Dec 30 15:41:09 PST 2024
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/121363
Two extra layers of subdirectory for a handful of single-symbol
Python source files did not improve anything, and it complicated
integration of the hdrgen Python outside the LLVM CMake build.
>From 2f1b44b236605b6865725c3148dbf654efdb0b1c Mon Sep 17 00:00:00 2001
From: Roland McGrath <mcgrathr at google.com>
Date: Sat, 28 Dec 2024 01:02:30 -0800
Subject: [PATCH] [libc] Remove unnecessary subdirectory layers in utils/hdrgen
Two extra layers of subdirectory for a handful of single-symbol
Python source files did not improve anything, and it complicated
integration of the hdrgen Python outside the LLVM CMake build.
---
.../classes => }/enumeration.py | 0
.../{class_implementation/classes => }/function.py | 0
.../{class_implementation/classes => }/macro.py | 0
.../{class_implementation/classes => }/object.py | 0
.../{class_implementation/classes => }/type.py | 0
libc/utils/hdrgen/yaml_to_classes.py | 13 +++++++------
6 files changed, 7 insertions(+), 6 deletions(-)
rename libc/utils/hdrgen/{class_implementation/classes => }/enumeration.py (100%)
rename libc/utils/hdrgen/{class_implementation/classes => }/function.py (100%)
rename libc/utils/hdrgen/{class_implementation/classes => }/macro.py (100%)
rename libc/utils/hdrgen/{class_implementation/classes => }/object.py (100%)
rename libc/utils/hdrgen/{class_implementation/classes => }/type.py (100%)
diff --git a/libc/utils/hdrgen/class_implementation/classes/enumeration.py b/libc/utils/hdrgen/enumeration.py
similarity index 100%
rename from libc/utils/hdrgen/class_implementation/classes/enumeration.py
rename to libc/utils/hdrgen/enumeration.py
diff --git a/libc/utils/hdrgen/class_implementation/classes/function.py b/libc/utils/hdrgen/function.py
similarity index 100%
rename from libc/utils/hdrgen/class_implementation/classes/function.py
rename to libc/utils/hdrgen/function.py
diff --git a/libc/utils/hdrgen/class_implementation/classes/macro.py b/libc/utils/hdrgen/macro.py
similarity index 100%
rename from libc/utils/hdrgen/class_implementation/classes/macro.py
rename to libc/utils/hdrgen/macro.py
diff --git a/libc/utils/hdrgen/class_implementation/classes/object.py b/libc/utils/hdrgen/object.py
similarity index 100%
rename from libc/utils/hdrgen/class_implementation/classes/object.py
rename to libc/utils/hdrgen/object.py
diff --git a/libc/utils/hdrgen/class_implementation/classes/type.py b/libc/utils/hdrgen/type.py
similarity index 100%
rename from libc/utils/hdrgen/class_implementation/classes/type.py
rename to libc/utils/hdrgen/type.py
diff --git a/libc/utils/hdrgen/yaml_to_classes.py b/libc/utils/hdrgen/yaml_to_classes.py
index 0e8ca2d8a82b0c..ec2441b78aee5f 100644
--- a/libc/utils/hdrgen/yaml_to_classes.py
+++ b/libc/utils/hdrgen/yaml_to_classes.py
@@ -11,13 +11,14 @@
import yaml
import argparse
from pathlib import Path
-from header import HeaderFile
+
+from enumeration import Enumeration
+from function import Function
from gpu_headers import GpuHeaderFile as GpuHeader
-from class_implementation.classes.macro import Macro
-from class_implementation.classes.type import Type
-from class_implementation.classes.function import Function
-from class_implementation.classes.enumeration import Enumeration
-from class_implementation.classes.object import Object
+from header import HeaderFile
+from macro import Macro
+from object import Object
+from type import Type
def yaml_to_classes(yaml_data, header_class, entry_points=None):
More information about the libc-commits
mailing list