From 9a74158ae7ac96e3d29bf7dd8d126c41ebf3d238 Mon Sep 17 00:00:00 2001 From: sofia Date: Wed, 21 Aug 2024 20:08:02 +0300 Subject: [PATCH] Minor tweaks --- src/codegen/llvm.rs | 4 ++-- src/codegen/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/codegen/llvm.rs b/src/codegen/llvm.rs index fddc2ff..934719b 100644 --- a/src/codegen/llvm.rs +++ b/src/codegen/llvm.rs @@ -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 ? diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 15ddff9..df5556b 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -12,7 +12,7 @@ pub fn from_statements<'a>( context: &'a mut IRContext, statements: Vec, ) -> Result, Error> { - Ok(context.module("hello".to_owned())) + Ok(context.module("testmod".to_owned())) } #[derive(thiserror::Error, Debug)]