Skip to content

Commit

Permalink
style: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
edg-l committed Feb 12, 2024
1 parent 0ff88f5 commit e724e25
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/edlang_codegen_llvm/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub fn compile(session: &Session, program: &ProgramBody) -> Result<PathBuf, Box<
&triple,
cpu_name.to_str()?,
cpu_features.to_str()?,
inkwell::OptimizationLevel::Default,
inkwell::OptimizationLevel::Aggressive,
inkwell::targets::RelocMode::Default,
inkwell::targets::CodeModel::Default,
)
Expand Down Expand Up @@ -276,7 +276,10 @@ fn compile_fn(ctx: &ModuleCompileCtx, fn_id: DefId) -> Result<(), BuilderError>
} else {
let ptr = ctx.builder.build_alloca(
compile_basic_type(ctx, &local.ty),
local.debug_name.as_deref().unwrap_or(&index.to_string()),
local
.debug_name
.as_deref()
.unwrap_or(&format!("temp_var_{index}")),
)?;
locals.insert(index, ptr);
}
Expand Down

0 comments on commit e724e25

Please sign in to comment.