From 1851674b5035527d16e342e9627fcf8e2da9e49e Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Thu, 15 Jun 2017 18:11:58 +0100 Subject: Code use API rather than raw CheckerInfo; begin work on generic procedures --- src/ir.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index b9f07c166..75f9b8153 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -1134,10 +1134,7 @@ irValue *ir_generate_array(irModule *m, Type *elem_type, i64 count, String prefi irBlock *ir_new_block(irProcedure *proc, AstNode *node, char *label) { Scope *scope = NULL; if (node != NULL) { - Scope **found = map_get(&proc->module->info->scopes, hash_pointer(node)); - if (found) { - scope = *found; - } + scope = scope_of_node(proc->module->info, node); GB_ASSERT_MSG(scope != NULL, "Block scope not found for %.*s", LIT(ast_node_strings[node->kind])); } -- cgit v1.2.3