| {{- /* |
| -------------------------------------------------------------------------------- |
| Template file for use with tools/src/cmd/gen to generate ctor_conv_intrinsic.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/lang/wgsl/resolver/ctor_conv_intrinsic.h" |
| |
| namespace tint::resolver { |
| |
| const char* str(CtorConvIntrinsic i) { |
| switch (i) { |
| case CtorConvIntrinsic::kNone: |
| return "<none>"; |
| {{- range Sem.ConstructorsAndConverters }} |
| case CtorConvIntrinsic::k{{Title .Name}}: |
| return "{{.Name}}"; |
| {{- end }} |
| } |
| return "<unknown>"; |
| } |
| |
| } // namespace tint::resolver |