[libc-commits] [libc] [libc] Remove unnecessary subdirectory layers in utils/hdrgen (PR #121363)

via libc-commits libc-commits at lists.llvm.org
Mon Dec 30 15:43:51 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Roland McGrath (frobtech)

<details>
<summary>Changes</summary>

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
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):

``````````

</details>


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


More information about the libc-commits mailing list