We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba15bf1 commit 1798e93Copy full SHA for 1798e93
src/libasr/pass/global_symbols.cpp
@@ -17,6 +17,9 @@ namespace LCompilers {
17
void pass_wrap_global_syms_into_module(Allocator &al,
18
ASR::TranslationUnit_t &unit,
19
const LCompilers::PassOptions &/*pass_options*/) {
20
+ if( unit.m_global_scope->get_scope().size() == 0 ) {
21
+ return ;
22
+ }
23
Location loc = unit.base.base.loc;
24
char *module_name = s2c(al, "_global_symbols");
25
SymbolTable *module_scope = al.make_new<SymbolTable>(unit.m_global_scope);
0 commit comments