Fix core library; Disable adding entity definitions for blank identifiers

This commit is contained in:
Ginger Bill
2017-01-07 11:44:42 +00:00
parent b1e35b6da3
commit 703e1aa2bc
8 changed files with 56 additions and 137 deletions

View File

@@ -148,7 +148,7 @@ String get_filepath_extension(String path) {
void init_build_context(BuildContext *bc) {
bc->ODIN_VENDOR = str_lit("odin");
bc->ODIN_VERSION = str_lit("0.0.5d");
bc->ODIN_VERSION = str_lit("0.0.5e");
bc->ODIN_ROOT = odin_root_dir();
#if defined(GB_SYSTEM_WINDOWS)

View File

@@ -722,6 +722,9 @@ void add_type_and_value(CheckerInfo *i, AstNode *expression, AddressingMode mode
void add_entity_definition(CheckerInfo *i, AstNode *identifier, Entity *entity) {
GB_ASSERT(identifier != NULL);
if (identifier->kind == AstNode_Ident) {
if (str_eq(identifier->Ident.string, str_lit("_"))) {
return;
}
HashKey key = hash_pointer(identifier);
map_entity_set(&i->definitions, key, entity);
} else {