From b016ec6b344e63bf18d3f90b3926c531288e2071 Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Tue, 30 Apr 2019 23:44:34 -0500 Subject: [PATCH] Add start_of_code_block to function --- lib/llvm-backend/src/code.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/llvm-backend/src/code.rs b/lib/llvm-backend/src/code.rs index 1a309dcfe..f9bfba26b 100644 --- a/lib/llvm-backend/src/code.rs +++ b/lib/llvm-backend/src/code.rs @@ -4724,6 +4724,12 @@ impl ModuleCodeGenerator ); let num_params = locals.len(); + let start_of_code_block = self.context.append_basic_block(&function, "start_of_code"); + let entry_end_inst = self + .builder + .build_unconditional_branch(&start_of_code_block); + self.builder.position_at_end(&start_of_code_block); + let code = LLVMFunctionCodeGenerator { state, builder: unsafe { ::std::mem::transmute::<&Builder, &'static Builder>(&self.builder) },