Skip to content

[libc] Remove unnecessary subdirectory layers in utils/hdrgen #121363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

frobtech
Copy link
Contributor

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.

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.
@frobtech frobtech marked this pull request as ready for review December 30, 2024 23:43
@llvmbot llvmbot added the libc label Dec 30, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 30, 2024

@llvm/pr-subscribers-libc

Author: Roland McGrath (frobtech)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/121363.diff

6 Files Affected:

  • (renamed) libc/utils/hdrgen/enumeration.py ()
  • (renamed) libc/utils/hdrgen/function.py ()
  • (renamed) libc/utils/hdrgen/macro.py ()
  • (renamed) libc/utils/hdrgen/object.py ()
  • (renamed) libc/utils/hdrgen/type.py ()
  • (modified) libc/utils/hdrgen/yaml_to_classes.py (+7-6)
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):

@frobtech frobtech merged commit 07e13b7 into llvm:main Dec 31, 2024
15 checks passed
@frobtech frobtech deleted the p/libc-hdrgen-classes branch December 31, 2024 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants