mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-13 06:41:26 -07:00
Remove @(static) for global variables
This commit is contained in:
+2
-3
@@ -899,10 +899,9 @@ void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast *type_expr,
|
||||
|
||||
e->Variable.thread_local_model = ac.thread_local_model;
|
||||
e->Variable.is_export = ac.is_export;
|
||||
e->flags &= ~EntityFlag_Static;
|
||||
if (ac.is_static) {
|
||||
e->flags |= EntityFlag_Static;
|
||||
} else {
|
||||
e->flags &= ~EntityFlag_Static;
|
||||
error(e->token, "@(static) is not supported for global variables, nor required");
|
||||
}
|
||||
ac.link_name = handle_link_name(ctx, e->token, ac.link_name, ac.link_prefix);
|
||||
|
||||
|
||||
@@ -14910,7 +14910,7 @@ void lb_generate_code(lbGenerator *gen) {
|
||||
LLVMMetadataRef llvm_file = lb_get_llvm_metadata(m, e->file);
|
||||
LLVMMetadataRef llvm_scope = llvm_file;
|
||||
|
||||
LLVMBool local_to_unit = e->flags & EntityFlag_Static;
|
||||
LLVMBool local_to_unit = LLVMGetLinkage(g.value) == LLVMInternalLinkage;
|
||||
|
||||
LLVMMetadataRef llvm_expr = LLVMDIBuilderCreateExpression(m->debug_builder, nullptr, 0);
|
||||
LLVMMetadataRef llvm_decl = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user