| {{- /* |
| -------------------------------------------------------------------------------- |
| Template file for use with tools/src/cmd/gen to generate builtin_fn.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 |
| -------------------------------------------------------------------------------- |
| */ -}} |
| |
| {{- $I := LoadIntrinsics "src/tint/lang/msl/msl.def" -}} |
| #include "src/tint/lang/msl/builtin_fn.h" |
| |
| namespace tint::msl { |
| |
| const char* str(BuiltinFn i) { |
| switch (i) { |
| case BuiltinFn::kNone: |
| return "<none>"; |
| {{- range $I.Sem.Builtins }} |
| case BuiltinFn::k{{PascalCase .Name}}: |
| return "{{.Name}}"; |
| {{- end }} |
| } |
| return "<unknown>"; |
| } |
| |
| } // namespace tint::msl |