Skip to content
Snippets Groups Projects
Commit 1db024c5 authored by Martin Bauer's avatar Martin Bauer
Browse files

Merge branch 'sort-headers' into 'master'

Sort headers/global definitions to enable reproducible code generation

See merge request !52
parents 97307848 673151f4
Branches
Tags
1 merge request!52Sort headers/global definitions to enable reproducible code generation
Pipeline #18260 passed with warnings
...@@ -87,7 +87,7 @@ def get_global_declarations(ast): ...@@ -87,7 +87,7 @@ def get_global_declarations(ast):
visit_node(ast) visit_node(ast)
return set(global_declarations) return sorted(set(global_declarations), key=lambda x: str(x))
def get_headers(ast_node: Node) -> Set[str]: def get_headers(ast_node: Node) -> Set[str]:
...@@ -103,7 +103,7 @@ def get_headers(ast_node: Node) -> Set[str]: ...@@ -103,7 +103,7 @@ def get_headers(ast_node: Node) -> Set[str]:
if isinstance(a, Node): if isinstance(a, Node):
headers.update(get_headers(a)) headers.update(get_headers(a))
return headers return sorted(headers)
# --------------------------------------- Backend Specific Nodes ------------------------------------------------------- # --------------------------------------- Backend Specific Nodes -------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment