From 263b849a380b8ada966e799ff391b6e699a29a00 Mon Sep 17 00:00:00 2001 From: varun-r-mallya Date: Tue, 9 Sep 2025 14:00:44 +0530 Subject: [PATCH] Add newline to IR output and update version number --- pythonbpf/codegen.py | 3 ++- pythonbpf/maps_pass.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pythonbpf/codegen.py b/pythonbpf/codegen.py index df1b59d..5c35954 100644 --- a/pythonbpf/codegen.py +++ b/pythonbpf/codegen.py @@ -84,10 +84,11 @@ def compile_to_ir(filename: str, output: str): module.add_named_metadata("llvm.module.flags", debug_info_version) module.add_named_metadata("llvm.module.flags", dwarf_version) - module.add_named_metadata("llvm.ident", ["llvmlite PythonBPF v0.0.0"]) + module.add_named_metadata("llvm.ident", ["llvmlite PythonBPF v0.0.1"]) with open(output, "w") as f: f.write(f"source_filename = \"{filename}\"\n") f.write(str(module)) + f.write("\n") return output diff --git a/pythonbpf/maps_pass.py b/pythonbpf/maps_pass.py index 413a601..cb5528a 100644 --- a/pythonbpf/maps_pass.py +++ b/pythonbpf/maps_pass.py @@ -105,7 +105,7 @@ def create_map_debug_info(module, map_global, map_name, map_params): type_member = module.add_debug_info("DIDerivedType", { "tag": dc.DW_TAG_member, "name": "type", - "file": file_metadata, # Use the stored file metadata + "file": file_metadata, "baseType": type_ptr, "size": 64, "offset": 0