blob: 2a9a060aa60538fefa2fd95ad4a4c67a26e86bd2 [file] [log] [blame]
{{- /*
--------------------------------------------------------------------------------
Template file for use with tools/builtin-gen to generate parameter_usage.cc
See:
* tools/cmd/builtin-gen/gen for structures used by this template
* https://golang.org/pkg/text/template/ for documentation on the template syntax
--------------------------------------------------------------------------------
*/ -}}
#include "src/tint/sem/parameter_usage.h"
namespace tint {
namespace sem {
const char* str(ParameterUsage usage) {
switch (usage) {
case ParameterUsage::kNone:
return "none";
{{- range .Sem.UniqueParameterNames }}
case ParameterUsage::k{{PascalCase .}}:
return "{{.}}";
{{- end }}
}
return "<unknown>";
}
} // namespace sem
} // namespace tint