Add @(raddbg_type_view=<optional-string>)

If no string parameter is provided, then one will be generated from the struct field tags.
The attribute must be applied if the automatic struct field tag approach is to be used.
This commit is contained in:
gingerBill
2025-08-21 17:14:33 +01:00
parent 0c9e1f5807
commit d5b1fc48fb
4 changed files with 210 additions and 0 deletions
+11
View File
@@ -161,6 +161,9 @@ struct AttributeContext {
String require_target_feature; // required by the target micro-architecture
String enable_target_feature; // will be enabled for the procedure only
bool raddbg_type_view;
String raddbg_type_view_string;
};
gb_internal gb_inline AttributeContext make_attribute_context(String link_prefix, String link_suffix) {
@@ -427,6 +430,11 @@ struct Defineable {
String pos_str;
};
struct RaddbgTypeView {
Type * type;
String view;
};
// CheckerInfo stores all the symbol information for a type-checked program
struct CheckerInfo {
Checker *checker;
@@ -487,6 +495,9 @@ struct CheckerInfo {
MPSCQueue<Entity *> foreign_imports_to_check_fullpaths;
MPSCQueue<Entity *> foreign_decls_to_check;
MPSCQueue<RaddbgTypeView> raddbg_type_views_queue;
Array<RaddbgTypeView> raddbg_type_views;
MPSCQueue<Ast *> intrinsics_entry_point_usage;
BlockingMutex objc_objc_msgSend_mutex;