dawn-cmake/src/tint/ast/builtin_value.h.tmpl
Ben Clayton f9ed9d3a63 tint/ast: Generate interpolate_attribute.[h|cc]
Emits all the enum info from the single-source-of-truth `intrinsics.def` file

Change-Id: Ie9deba9e64927945133027cf243777944119ea41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105327
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-10-11 19:49:17 +00:00

27 lines
760 B
Cheetah

{{- /*
--------------------------------------------------------------------------------
Template file for use with tools/src/cmd/gen to generate builtin_value.h
See:
* tools/src/cmd/gen for structures used by this template
* https://golang.org/pkg/text/template/ for documentation on the template syntax
--------------------------------------------------------------------------------
*/ -}}
{{- Import "src/tint/templates/enums.tmpl.inc" -}}
{{- $enum := (Sem.Enum "builtin_value") -}}
#ifndef SRC_TINT_AST_BUILTIN_VALUE_H_
#define SRC_TINT_AST_BUILTIN_VALUE_H_
#include <ostream>
namespace tint::ast {
/// Builtin value defined with `@builtin(<name>)`.
{{ Eval "DeclareEnum" $enum}}
} // namespace tint::ast
#endif // SRC_TINT_AST_BUILTIN_VALUE_H_