Skip to content

Commit 28480b4

Browse files
committed
Changed module name in codegeneration
1 parent a9cd2b3 commit 28480b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/codegen/codegen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,11 @@ static void link(std::string executable_name, std::string object_file_name, std:
353353
// Constructor
354354
codegen::Context::Context(ast::Ast& ast) : ast(ast) {
355355
this->current_module = ast.module_path;
356+
auto filename = ast.module_path.filename().string();
356357

357358
// Create llvm context
358359
this->context = new llvm::LLVMContext();
359-
this->module = new llvm::Module("My cool jit", *(this->context));
360+
this->module = new llvm::Module(filename, *(this->context));
360361
this->builder = new llvm::IRBuilder(*(this->context));
361362

362363
// Add function pass optimizations

0 commit comments

Comments
 (0)