|
@@ -675,6 +675,33 @@ OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) {
|
|
types[0] = odin_doc_type(w, type->Proc.params);
|
|
types[0] = odin_doc_type(w, type->Proc.params);
|
|
types[1] = odin_doc_type(w, type->Proc.results);
|
|
types[1] = odin_doc_type(w, type->Proc.results);
|
|
doc_type.types = odin_write_slice(w, types, gb_count_of(types));
|
|
doc_type.types = odin_write_slice(w, types, gb_count_of(types));
|
|
|
|
+
|
|
|
|
+ String calling_convention = {};
|
|
|
|
+ switch (type->Proc.calling_convention) {
|
|
|
|
+ case ProcCC_Invalid:
|
|
|
|
+ case ProcCC_Odin:
|
|
|
|
+ // no need
|
|
|
|
+ break;
|
|
|
|
+ case ProcCC_Contextless:
|
|
|
|
+ calling_convention = str_lit("contextless");
|
|
|
|
+ break;
|
|
|
|
+ case ProcCC_CDecl:
|
|
|
|
+ calling_convention = str_lit("cdecl");
|
|
|
|
+ break;
|
|
|
|
+ case ProcCC_StdCall:
|
|
|
|
+ calling_convention = str_lit("stdcall");
|
|
|
|
+ break;
|
|
|
|
+ case ProcCC_FastCall:
|
|
|
|
+ calling_convention = str_lit("fastcall");
|
|
|
|
+ break;
|
|
|
|
+ case ProcCC_None:
|
|
|
|
+ calling_convention = str_lit("none");
|
|
|
|
+ break;
|
|
|
|
+ case ProcCC_InlineAsm:
|
|
|
|
+ calling_convention = str_lit("inline-assembly");
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ doc_type.calling_convention = odin_doc_write_string(w, calling_convention);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case Type_BitSet:
|
|
case Type_BitSet:
|