Skip to content

Commit

Permalink
[libc] newhdrgen: removed Include class (#99584)
Browse files Browse the repository at this point in the history
Include class is not used (includes are made through Macro class, Type
class, and imports from .h.def files).
  • Loading branch information
RoseZhang03 authored Jul 18, 2024
1 parent e73d51d commit 043aca3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
17 changes: 0 additions & 17 deletions libc/newhdrgen/class_implementation/classes/include.py

This file was deleted.

1 change: 0 additions & 1 deletion libc/newhdrgen/gpu_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def __init__(self, name):
self.enumerations = []
self.objects = []
self.functions = []
self.includes = []

def add_macro(self, macro):
self.macros.append(macro)
Expand Down
7 changes: 0 additions & 7 deletions libc/newhdrgen/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def __init__(self, name):
self.enumerations = []
self.objects = []
self.functions = []
self.includes = []

def add_macro(self, macro):
self.macros.append(macro)
Expand All @@ -34,15 +33,9 @@ def add_object(self, object):
def add_function(self, function):
self.functions.append(function)

def add_include(self, include):
self.includes.append(include)

def __str__(self):
content = [""]

for include in self.includes:
content.append(str(include))

for macro in self.macros:
content.append(f"{macro}\n")

Expand Down
4 changes: 0 additions & 4 deletions libc/newhdrgen/yaml_to_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
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.include import Include
from class_implementation.classes.enumeration import Enumeration
from class_implementation.classes.object import Object

Expand Down Expand Up @@ -103,9 +102,6 @@ def yaml_to_classes(yaml_data, header_class, entry_points=None):
Object(object_data["object_name"], object_data["object_type"])
)

for include_data in yaml_data.get("includes", []):
header.add_include(Include(include_data))

return header


Expand Down

0 comments on commit 043aca3

Please sign in to comment.