File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4985,6 +4985,7 @@ namespace LCompilers {
49854985 llvm::BasicBlock *mergeBB = llvm::BasicBlock::Create (context, " ifcont" );
49864986 builder->CreateCondBr (cond, thenBB, elseBB);
49874987 builder->SetInsertPoint (thenBB);
4988+ builder0.SetInsertPoint (&entry_block, entry_block.getFirstInsertionPt ());
49884989 llvm::AllocaInst *idx = builder0.CreateAlloca (llvm::Type::getInt32Ty (context), nullptr );
49894990 LLVM::CreateStore (*builder, llvm::ConstantInt::get (
49904991 context, llvm::APInt (32 , 0 )), idx);
@@ -5066,6 +5067,7 @@ namespace LCompilers {
50665067
50675068 llvm::Value *a_len = llvm_utils->list_api ->len (l1);
50685069 llvm::Value *b_len = llvm_utils->list_api ->len (l2);
5070+ builder0.SetInsertPoint (&entry_block, entry_block.getFirstInsertionPt ());
50695071 llvm::AllocaInst *idx = builder0.CreateAlloca (llvm::Type::getInt32Ty (context), nullptr );
50705072 LLVM::CreateStore (*builder, llvm::ConstantInt::get (
50715073 context, llvm::APInt (32 , 0 )), idx);
You can’t perform that action at this time.
0 commit comments