remove duplicate definition of container_string

master
Andrew Kelley 2016-12-18 17:53:12 -05:00
parent ba008fb9d7
commit 4816121e00
3 changed files with 3 additions and 10 deletions

View File

@ -115,7 +115,7 @@ static const char *const_or_var_string(bool is_const) {
return is_const ? "const" : "var";
}
static const char *container_string(ContainerKind kind) {
const char *container_string(ContainerKind kind) {
switch (kind) {
case ContainerKindEnum: return "enum";
case ContainerKindStruct: return "struct";

View File

@ -17,5 +17,7 @@ void ast_print(FILE *f, AstNode *node, int indent);
void ast_render(FILE *f, AstNode *node, int indent_size);
const char *container_string(ContainerKind kind);
#endif

View File

@ -3853,15 +3853,6 @@ static IrInstruction *ir_gen_err_ok_or(IrBuilder *irb, Scope *parent_scope, AstN
return ir_build_phi(irb, parent_scope, node, 2, incoming_blocks, incoming_values);
}
static const char *container_string(ContainerKind kind) {
switch (kind) {
case ContainerKindEnum: return "enum";
case ContainerKindStruct: return "struct";
case ContainerKindUnion: return "union";
}
zig_unreachable();
}
static IrInstruction *ir_gen_container_decl(IrBuilder *irb, Scope *parent_scope, AstNode *node) {
assert(node->type == NodeTypeContainerDecl);