diff --git a/src/libasr/codegen/asr_to_llvm.cpp b/src/libasr/codegen/asr_to_llvm.cpp index 80a6190ddb..b7d6889304 100644 --- a/src/libasr/codegen/asr_to_llvm.cpp +++ b/src/libasr/codegen/asr_to_llvm.cpp @@ -2453,27 +2453,6 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor } } llvm_symtab[h] = ptr; - } else if (x.m_type->type == ASR::ttypeType::UnsignedInteger) { - int a_kind = down_cast(x.m_type)->m_kind; - llvm::Type *type; - int init_value_bits = 8*a_kind; - type = llvm_utils->getIntType(a_kind); - llvm::Constant *ptr = module->getOrInsertGlobal(x.m_name, - type); - if (!external) { - if (ASRUtils::is_array(x.m_type)) { - throw CodeGenError("Arrays are not supported by visit_Variable"); - } - if (init_value) { - module->getNamedGlobal(x.m_name)->setInitializer( - init_value); - } else { - module->getNamedGlobal(x.m_name)->setInitializer( - llvm::ConstantInt::get(context, - llvm::APInt(init_value_bits, 0))); - } - } - llvm_symtab[h] = ptr; } else if (x.m_type->type == ASR::ttypeType::Real) { int a_kind = down_cast(x.m_type)->m_kind; llvm::Type *type; diff --git a/src/libasr/pass/subroutine_from_function.cpp b/src/libasr/pass/subroutine_from_function.cpp index d1cee717fe..576da77446 100644 --- a/src/libasr/pass/subroutine_from_function.cpp +++ b/src/libasr/pass/subroutine_from_function.cpp @@ -15,11 +15,11 @@ namespace LCompilers { using ASR::down_cast; using ASR::is_a; -class CreateFunctionFromSubroutine: public PassUtils::PassVisitor { +class CreateSubroutineFromFunction: public PassUtils::PassVisitor { public: - CreateFunctionFromSubroutine(Allocator &al_) : + CreateSubroutineFromFunction(Allocator &al_) : PassVisitor(al_, nullptr) { pass_result.reserve(al, 1); @@ -228,7 +228,7 @@ class ReplaceFunctionCallWithSubroutineCallVisitor: void pass_create_subroutine_from_function(Allocator &al, ASR::TranslationUnit_t &unit, const LCompilers::PassOptions& /*pass_options*/) { - CreateFunctionFromSubroutine v(al); + CreateSubroutineFromFunction v(al); v.visit_TranslationUnit(unit); ReplaceFunctionCallWithSubroutineCallVisitor u(al); u.visit_TranslationUnit(unit);