Terminator found in the middle of a basic block error

Hello,

I am currently building a compilator for an extended CIL to LLVM with the OCaml’s LLVM API.

For all the branch statements, I need to create some basic block to represente the LLVM branchement.

But after compilation, I got a module error

See message error below :

Terminator found in the middle of a basic block!
label %lbl3
Broken module found, compilation aborted!
Aborted (core dumped)

Problem resolved,
sound like a mistake in my source code.
Just forgot to manage my builders.