From 421f3176292b35256aba24088baadd1c7e95728a Mon Sep 17 00:00:00 2001 From: advik Date: Tue, 18 Jun 2024 16:11:12 +0530 Subject: [PATCH 1/2] Add deepcopy for sets --- src/libasr/codegen/llvm_utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libasr/codegen/llvm_utils.cpp b/src/libasr/codegen/llvm_utils.cpp index 7a317e04c1..3526370b97 100644 --- a/src/libasr/codegen/llvm_utils.cpp +++ b/src/libasr/codegen/llvm_utils.cpp @@ -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_type); + set_api->set_deepcopy(src, dest, set_type, module, name2memidx); + break; + } case ASR::ttypeType::Struct: { ASR::Struct_t* struct_t = ASR::down_cast(asr_type); ASR::StructType_t* struct_type_t = ASR::down_cast( From 72c564afaf38d5418307b2714a213a500cd4cb3c Mon Sep 17 00:00:00 2001 From: advik Date: Tue, 18 Jun 2024 19:22:02 +0530 Subject: [PATCH 2/2] Update is_llvm_struct --- src/libasr/codegen/llvm_utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libasr/codegen/llvm_utils.h b/src/libasr/codegen/llvm_utils.h index 0ea2644e96..1d46855ebc 100644 --- a/src/libasr/codegen/llvm_utils.h +++ b/src/libasr/codegen/llvm_utils.h @@ -182,7 +182,8 @@ namespace LCompilers { ASR::is_a(*asr_type) || ASR::is_a(*asr_type) || ASR::is_a(*asr_type)|| - ASR::is_a(*asr_type); + ASR::is_a(*asr_type) || + ASR::is_a(*asr_type); } static inline bool is_llvm_pointer(const ASR::ttype_t& asr_type) { return ( ASR::is_a(asr_type) ||