Add newline to IR output and update version number

This commit is contained in:
2025-09-09 14:00:44 +05:30
parent 75231cc7fb
commit 263b849a38
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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