mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Move check for type info above
This commit is contained in:
+8
-4
@@ -1735,10 +1735,6 @@ gb_internal void add_type_info_type(CheckerContext *c, Type *t) {
|
|||||||
if (build_context.disallow_rtti) {
|
if (build_context.disallow_rtti) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
add_type_info_type_internal(c, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
gb_internal void add_type_info_type_internal(CheckerContext *c, Type *t) {
|
|
||||||
if (t == nullptr) {
|
if (t == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1750,6 +1746,14 @@ gb_internal void add_type_info_type_internal(CheckerContext *c, Type *t) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add_type_info_type_internal(c, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
gb_internal void add_type_info_type_internal(CheckerContext *c, Type *t) {
|
||||||
|
if (t == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
add_type_info_dependency(c->info, c->decl, t);
|
add_type_info_dependency(c->info, c->decl, t);
|
||||||
|
|
||||||
MUTEX_GUARD_BLOCK(&c->info->type_info_mutex) {
|
MUTEX_GUARD_BLOCK(&c->info->type_info_mutex) {
|
||||||
|
|||||||
Reference in New Issue
Block a user