blob: bc413e103a92f58e367b599cc46a384f88366e1f [file] [log] [blame] [edit]
{{- /*
--------------------------------------------------------------------------------
Template file for use with tools/builtin-gen to generate parameter_usage.cc
See:
* tools/cmd/intrinsic-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::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