aboutsummaryrefslogtreecommitdiff
path: root/src/docs_writer.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-02-16 16:04:20 +0000
committergingerBill <bill@gingerbill.org>2022-02-16 16:04:20 +0000
commit8e8a075a2232038eb3a24e2b7b0a0b183d13b89d (patch)
tree281af208f9cdc367ba793991c3242db94a1eb851 /src/docs_writer.cpp
parent65dedbb1caaa785a444d32a7a15adaf6c396b07f (diff)
parentdb6bd9b358f17c0259ff5fe6411ce93407613338 (diff)
Merge branch 'master' into directx-packages
Diffstat (limited to 'src/docs_writer.cpp')
-rw-r--r--src/docs_writer.cpp35
1 files changed, 1 insertions, 34 deletions
diff --git a/src/docs_writer.cpp b/src/docs_writer.cpp
index 0474ce8ff..2c5186c39 100644
--- a/src/docs_writer.cpp
+++ b/src/docs_writer.cpp
@@ -683,40 +683,7 @@ OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) {
types[1] = odin_doc_type(w, type->Proc.results);
doc_type.types = odin_write_slice(w, types, gb_count_of(types));
- String calling_convention = {};
- switch (type->Proc.calling_convention) {
- case ProcCC_Invalid:
- // no need
- break;
- case ProcCC_Odin:
- if (default_calling_convention() != ProcCC_Odin) {
- calling_convention = str_lit("odin");
- }
- break;
- case ProcCC_Contextless:
- if (default_calling_convention() != 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_Naked:
- calling_convention = str_lit("naked");
- break;
- case ProcCC_InlineAsm:
- calling_convention = str_lit("inline-assembly");
- break;
- }
+ String calling_convention = make_string_c(proc_calling_convention_strings[type->Proc.calling_convention]);
doc_type.calling_convention = odin_doc_write_string(w, calling_convention);
}
break;