Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d23911b

Browse files
committed
Remove code that never gets triggered
1 parent 0b4d13a commit d23911b

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,6 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
568568
Allocator &al;
569569
LocationManager &lm;
570570
SymbolTable *current_scope;
571-
// The current_module contains the current module that is being visited;
572-
// this is used to append to the module dependencies if needed
573-
ASR::Module_t *current_module = nullptr;
574571
SetChar current_module_dependencies;
575572
// True for the main module, false for every other one
576573
// The main module is stored directly in TranslationUnit, other modules are Modules
@@ -668,24 +665,7 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
668665
v = current_scope->get_symbol(sym);
669666
}
670667

671-
// Now we need to add the module `m` with the intrinsic function
672-
// into the current module dependencies
673-
if (current_module) {
674-
// We are in body visitor, the module is already constructed
675-
// and available as current_module.
676-
// Add the module `m` to current module dependencies
677-
SetChar vec;
678-
vec.from_pointer_n_copy(al, current_module->m_dependencies,
679-
current_module->n_dependencies);
680-
vec.push_back(al, m->m_name);
681-
current_module->m_dependencies = vec.p;
682-
current_module->n_dependencies = vec.size();
683-
} else {
684-
// We are in the symtab visitor or body visitor and we are
685-
// constructing a module, so current_module is not available yet
686-
// (the current_module_dependencies is not used in body visitor)
687-
current_module_dependencies.push_back(al, m->m_name);
688-
}
668+
current_module_dependencies.push_back(al, m->m_name);
689669
return v;
690670
}
691671

0 commit comments

Comments
 (0)