Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 1 | {{- /* |
| 2 | -------------------------------------------------------------------------------- |
dan sinclair | ff7cf21 | 2022-10-03 14:05:23 +0000 | [diff] [blame] | 3 | Template file for use with tools/src/cmd/gen to generate address_space.cc |
Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 4 | |
| 5 | To update the generated file, run: |
| 6 | ./tools/run gen |
| 7 | |
| 8 | See: |
| 9 | * tools/src/cmd/gen for structures used by this template |
| 10 | * https://golang.org/pkg/text/template/ for documentation on the template syntax |
| 11 | -------------------------------------------------------------------------------- |
| 12 | */ -}} |
| 13 | |
Ben Clayton | 2dffb3c | 2023-08-07 12:35:33 +0000 | [diff] [blame] | 14 | {{- $I := LoadIntrinsics "src/tint/lang/core/core.def" -}} |
dan sinclair | 22b4dd2 | 2023-07-21 00:40:07 +0000 | [diff] [blame] | 15 | {{- Import "src/tint/utils/templates/enums.tmpl.inc" -}} |
Ben Clayton | 2dffb3c | 2023-08-07 12:35:33 +0000 | [diff] [blame] | 16 | {{- $enum := ($I.Sem.Enum "address_space") -}} |
Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 17 | |
Ben Clayton | cd52f38 | 2023-08-07 13:11:08 +0000 | [diff] [blame] | 18 | #include "src/tint/lang/core/address_space.h" |
Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 19 | |
Ben Clayton | cd52f38 | 2023-08-07 13:11:08 +0000 | [diff] [blame] | 20 | namespace tint::core { |
Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 21 | |
| 22 | {{ Eval "ParseEnum" $enum}} |
| 23 | |
| 24 | {{ Eval "EnumOStream" $enum}} |
| 25 | |
Ben Clayton | cd52f38 | 2023-08-07 13:11:08 +0000 | [diff] [blame] | 26 | } // namespace tint::core |