Skip to content

Commit

Permalink
Use builder0 for variable declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
advikkabra authored and czgdp1807 committed Aug 16, 2024
1 parent 4b06d70 commit ee8a29e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libasr/codegen/asr_to_llvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3541,7 +3541,6 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>

template<typename T>
void declare_vars(const T &x, bool create_vtabs=true) {
get_builder0()
llvm::Value *target_var;
uint32_t debug_arg_count = 0;
std::vector<std::string> var_order = ASRUtils::determine_variable_declaration_order(x.m_symtab);
Expand Down Expand Up @@ -3666,7 +3665,8 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
llvm::Constant *init_value = llvm::Constant::getNullValue(type);
gptr->setInitializer(init_value);
} else {
ptr = builder->CreateAlloca(type, array_size, v->m_name);
get_builder0()
ptr = builder0.CreateAlloca(type, array_size, v->m_name);
}
}
set_pointer_variable_to_null(llvm::ConstantPointerNull::get(
Expand Down

0 comments on commit ee8a29e

Please sign in to comment.