blob: 62cb42e6f20a861346daf61ad66134a503762f7e [file] [log] [blame]
{{- /*
--------------------------------------------------------------------------------
Template file for use with tools/src/cmd/gen to generate parameter_usage.cc
To update the generated file, run:
./tools/run gen
See:
* tools/src/cmd/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::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 tint::sem