diff options
| author | gingerBill <bill@gingerbill.org> | 2021-06-08 14:33:49 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-06-08 14:33:49 +0100 |
| commit | f19bb0f4d45ba4352c4392807ca2b1efe5918ea7 (patch) | |
| tree | 852f3256f8f7e0fd85a95de69cde84b6f17992e5 /src/docs_writer.cpp | |
| parent | 76bb82a7260158cb1ecd5d2da1b775fbdb1f0b7d (diff) | |
Make default calling convention code more correct to read
Diffstat (limited to 'src/docs_writer.cpp')
| -rw-r--r-- | src/docs_writer.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/docs_writer.cpp b/src/docs_writer.cpp index fb4573b9f..19f5ae156 100644 --- a/src/docs_writer.cpp +++ b/src/docs_writer.cpp @@ -676,11 +676,17 @@ OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) { String calling_convention = {}; switch (type->Proc.calling_convention) { case ProcCC_Invalid: - case ProcCC_Odin: // no need break; + case ProcCC_Odin: + if (default_calling_convention() != ProcCC_Odin) { + calling_convention = str_lit("odin"); + } + break; case ProcCC_Contextless: - calling_convention = str_lit("contextless"); + if (default_calling_convention() != ProcCC_Contextless) { + calling_convention = str_lit("contextless"); + } break; case ProcCC_CDecl: calling_convention = str_lit("cdecl"); |