Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set deepcopy #2738

Merged
merged 3 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/libasr/codegen/llvm_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,11 @@ namespace LCompilers {
dict_api->dict_deepcopy(src, dest, dict_type, module, name2memidx);
break ;
}
case ASR::ttypeType::Set: {
ASR::Set_t *set_type = ASR::down_cast<ASR::Set_t>(asr_type);
set_api->set_deepcopy(src, dest, set_type, module, name2memidx);
break;
}
case ASR::ttypeType::StructType: {
ASR::StructType_t* struct_t = ASR::down_cast<ASR::StructType_t>(asr_type);
ASR::Struct_t* struct_type_t = ASR::down_cast<ASR::Struct_t>(
Expand Down
3 changes: 2 additions & 1 deletion src/libasr/codegen/llvm_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ namespace LCompilers {
ASR::is_a<ASR::List_t>(*asr_type) ||
ASR::is_a<ASR::StructType_t>(*asr_type) ||
ASR::is_a<ASR::Class_t>(*asr_type)||
ASR::is_a<ASR::Dict_t>(*asr_type);
ASR::is_a<ASR::Dict_t>(*asr_type) ||
ASR::is_a<ASR::Set_t>(*asr_type);
}
static inline bool is_llvm_pointer(const ASR::ttype_t& asr_type) {
return ( ASR::is_a<ASR::Pointer_t>(asr_type) ||
Expand Down
Loading