mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 10:50:05 +00:00
Fix constant aliasing for debug information
This commit is contained in:
+1
-1
@@ -359,7 +359,7 @@ void override_entity_in_scope(Entity *original_entity, Entity *new_entity) {
|
|||||||
}
|
}
|
||||||
if (original_entity->identifier != nullptr &&
|
if (original_entity->identifier != nullptr &&
|
||||||
original_entity->identifier->kind == Ast_Ident) {
|
original_entity->identifier->kind == Ast_Ident) {
|
||||||
original_entity->identifier->Ident.entity = new_entity;
|
original_entity->identifier->Ident.entity = nullptr;
|
||||||
}
|
}
|
||||||
original_entity->flags |= EntityFlag_Overridden;
|
original_entity->flags |= EntityFlag_Overridden;
|
||||||
|
|
||||||
|
|||||||
@@ -3544,7 +3544,9 @@ void lb_build_constant_value_decl(lbProcedure *p, AstValueDecl *vd) {
|
|||||||
Ast *ident = vd->names[i];
|
Ast *ident = vd->names[i];
|
||||||
GB_ASSERT(ident->kind == Ast_Ident);
|
GB_ASSERT(ident->kind == Ast_Ident);
|
||||||
Entity *e = entity_of_node(ident);
|
Entity *e = entity_of_node(ident);
|
||||||
GB_ASSERT(e != nullptr);
|
if (e == nullptr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (e->kind != Entity_TypeName) {
|
if (e->kind != Entity_TypeName) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -3573,7 +3575,9 @@ void lb_build_constant_value_decl(lbProcedure *p, AstValueDecl *vd) {
|
|||||||
Ast *ident = vd->names[i];
|
Ast *ident = vd->names[i];
|
||||||
GB_ASSERT(ident->kind == Ast_Ident);
|
GB_ASSERT(ident->kind == Ast_Ident);
|
||||||
Entity *e = entity_of_node(ident);
|
Entity *e = entity_of_node(ident);
|
||||||
GB_ASSERT(e != nullptr);
|
if (e == nullptr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (e->kind != Entity_Procedure) {
|
if (e->kind != Entity_Procedure) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1502,6 +1502,10 @@ bool is_semicolon_optional_for_node(AstFile *f, Ast *s) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (build_context.insert_semicolon) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
switch (s->kind) {
|
switch (s->kind) {
|
||||||
case Ast_EmptyStmt:
|
case Ast_EmptyStmt:
|
||||||
case Ast_BlockStmt:
|
case Ast_BlockStmt:
|
||||||
|
|||||||
Reference in New Issue
Block a user