Pass kernel return alongside attributes writeback #552

Merged
sb10q merged 4 commits from occheung/nac3:kern-return into master 2024-11-16 12:04:05 +08:00
1 changed files with 11 additions and 1 deletions
Showing only changes of commit beaa38047d - Show all commits

View File

@ -42,7 +42,7 @@ use nac3core::{
inkwell::{ inkwell::{
context::Context, context::Context,
memory_buffer::MemoryBuffer, memory_buffer::MemoryBuffer,
module::{Linkage, Module}, module::{FlagBehavior, Linkage, Module},
passes::PassBuilderOptions, passes::PassBuilderOptions,
support::is_multithreaded, support::is_multithreaded,
targets::*, targets::*,
@ -713,6 +713,16 @@ impl Nac3 {
let target_machine = self.llvm_options.create_target_machine().unwrap(); let target_machine = self.llvm_options.create_target_machine().unwrap();
module.set_data_layout(&target_machine.get_target_data().get_data_layout()); module.set_data_layout(&target_machine.get_target_data().get_data_layout());
module.set_triple(&target_machine.get_triple()); module.set_triple(&target_machine.get_triple());
module.add_basic_value_flag(
"Debug Info Version",
FlagBehavior::Warning,
context.i32_type().const_int(3, false),
);
module.add_basic_value_flag(
"Dwarf Version",
FlagBehavior::Warning,
context.i32_type().const_int(4, false),
);
let builder = context.create_builder(); let builder = context.create_builder();
let (_, module, _) = gen_func_impl( let (_, module, _) = gen_func_impl(
&context, &context,