Minor tweaks

This commit is contained in:
Sofia 2024-08-21 20:08:02 +03:00
parent dd3e0618ae
commit 9a74158ae7
2 changed files with 3 additions and 3 deletions

View File

@ -35,10 +35,10 @@ impl IRContext {
let mut argts = [];
let func_type = LLVMFunctionType(t, argts.as_mut_ptr(), argts.len() as u32, 0);
let anon_func = LLVMAddFunction(module, into_cstring("test").as_ptr(), func_type);
let anon_func = LLVMAddFunction(module, into_cstring("testfunc").as_ptr(), func_type);
let blockref =
LLVMCreateBasicBlockInContext(self.context, into_cstring("otus").as_ptr());
LLVMCreateBasicBlockInContext(self.context, into_cstring("entryblock").as_ptr());
LLVMPositionBuilderAtEnd(self.builder, blockref);
// What is the last 1 ?

View File

@ -12,7 +12,7 @@ pub fn from_statements<'a>(
context: &'a mut IRContext,
statements: Vec<TopLevelStatement>,
) -> Result<IRModule<'a>, Error> {
Ok(context.module("hello".to_owned()))
Ok(context.module("testmod".to_owned()))
}
#[derive(thiserror::Error, Debug)]