aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/ast_render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stage1/ast_render.cpp')
-rw-r--r--src/stage1/ast_render.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/stage1/ast_render.cpp b/src/stage1/ast_render.cpp
index ed53cf7ccb..75ad7267ab 100644
--- a/src/stage1/ast_render.cpp
+++ b/src/stage1/ast_render.cpp
@@ -123,8 +123,13 @@ static const char *export_string(bool is_export) {
// zig_unreachable();
//}
-static const char *inline_string(bool is_inline) {
- return is_inline ? "inline" : "";
+static const char *inline_string(FnInline fn_inline) {
+ switch (fn_inline) {
+ case FnInlineAlways: return "inline ";
+ case FnInlineNever: return "noinline ";
+ case FnInlineAuto: return "";
+ }
+ zig_unreachable();
}
static const char *const_or_var_string(bool is_const) {
@@ -441,7 +446,7 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
const char *pub_str = visib_mod_string(node->data.fn_proto.visib_mod);
const char *extern_str = extern_string(node->data.fn_proto.is_extern);
const char *export_str = export_string(node->data.fn_proto.is_export);
- const char *inline_str = inline_string(node->data.fn_proto.is_noinline);
+ const char *inline_str = inline_string(node->data.fn_proto.fn_inline);
fprintf(ar->f, "%s%s%s%sfn ", pub_str, inline_str, export_str, extern_str);
if (node->data.fn_proto.name != nullptr) {
print_symbol(ar, node->data.fn_proto.name);