Skip to content

Commit

Permalink
make aliasscope more resilient to missing push
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Mar 26, 2019
1 parent 8649af9 commit 5291cbf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6017,7 +6017,12 @@ static std::unique_ptr<Module> emit_function(
} else if (expr->head == popaliasscope_sym) {
scope_stack.pop_back();
scope_list_stack.pop_back();
current_aliasscope = scope_list_stack.back();
if (scope_list_stack.empty()) {
// XXX: should we error here?
current_aliasscope = NULL;
} else {
current_aliasscope = scope_list_stack.back();
}
}
}
aliasscopes[i+1] = current_aliasscope;
Expand Down

0 comments on commit 5291cbf

Please sign in to comment.