From f6cbb73c7402fc100bbfb26c1a35c9f23b3f36ff Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 1 Dec 2016 21:08:12 -0500 Subject: rewrite scope implementation * now there are not extra unused hash tables * each variable declaration opens a new scope inside a function --- src/parseh.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/parseh.cpp') diff --git a/src/parseh.cpp b/src/parseh.cpp index 7629a524fb..8d7e2fbce3 100644 --- a/src/parseh.cpp +++ b/src/parseh.cpp @@ -817,7 +817,7 @@ static TypeTableEntry *resolve_enum_decl(Context *c, const EnumDecl *enum_decl) const EnumDecl *enum_def = enum_decl->getDefinition(); if (!enum_def) { TypeTableEntry *enum_type = get_partial_container_type(c->codegen, c->import, - c->import->scope, + &c->import->decls_scope->base, ContainerKindEnum, c->source_node, buf_ptr(full_type_name)); c->enum_type_table.put(bare_name, enum_type); c->decl_table.put(enum_decl, enum_type); @@ -842,7 +842,7 @@ static TypeTableEntry *resolve_enum_decl(Context *c, const EnumDecl *enum_decl) if (pure_enum) { TypeTableEntry *enum_type = get_partial_container_type(c->codegen, c->import, - c->import->scope, + &c->import->decls_scope->base, ContainerKindEnum, c->source_node, buf_ptr(full_type_name)); c->enum_type_table.put(bare_name, enum_type); c->decl_table.put(enum_decl, enum_type); @@ -1002,7 +1002,7 @@ static TypeTableEntry *resolve_record_decl(Context *c, const RecordDecl *record_ TypeTableEntry *struct_type = get_partial_container_type(c->codegen, c->import, - c->import->scope, ContainerKindStruct, c->source_node, buf_ptr(full_type_name)); + &c->import->decls_scope->base, ContainerKindStruct, c->source_node, buf_ptr(full_type_name)); c->struct_type_table.put(bare_name, struct_type); c->decl_table.put(record_decl, struct_type); -- cgit v1.2.3