aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-15 18:11:58 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-15 18:11:58 +0100
commit1851674b5035527d16e342e9627fcf8e2da9e49e (patch)
tree04cde40837141448f2eb8dc60ea46480c93d6b72 /src/ir.cpp
parentc5ef5279d4346fe1b38815060303b17159adbc82 (diff)
Code use API rather than raw CheckerInfo; begin work on generic procedures
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp5
1 files changed, 1 insertions, 4 deletions
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]));
}