Add start_of_code_block to function

This commit is contained in:
Brandon Fish 2019-04-30 23:44:34 -05:00
parent 0ee2ba0ee6
commit b016ec6b34

View File

@ -4724,6 +4724,12 @@ impl ModuleCodeGenerator<LLVMFunctionCodeGenerator, LLVMBackend, CodegenError>
); );
let num_params = locals.len(); 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 { let code = LLVMFunctionCodeGenerator {
state, state,
builder: unsafe { ::std::mem::transmute::<&Builder, &'static Builder>(&self.builder) }, builder: unsafe { ::std::mem::transmute::<&Builder, &'static Builder>(&self.builder) },