writer/msl: Fix ignore() test validation failure

Functions cannot be called main, and we do not run the rename reserved
keywords transform as part of the sanitizer.

Change-Id: Iea67fe08c7e94e473d622b7f349caf8d09f41784
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54101
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
James Price 2021-06-09 21:56:59 +00:00 committed by Tint LUCI CQ
parent 3832b8e05d
commit 5b2f49b5df
1 changed files with 2 additions and 2 deletions

View File

@ -346,7 +346,7 @@ TEST_F(MslGeneratorImplTest, Ignore) {
Func("f", {Param("a", ty.i32()), Param("b", ty.i32()), Param("c", ty.i32())},
ty.i32(), {Return(Mul(Add("a", "b"), "c"))});
Func("main", {}, ty.void_(),
Func("func", {}, ty.void_(),
{create<ast::CallStatement>(Call("ignore", Call("f", 1, 2, 3)))},
{Stage(ast::PipelineStage::kCompute)});
@ -360,7 +360,7 @@ int f(int a, int b, int c) {
return ((a + b) * c);
}
kernel void main() {
kernel void func() {
(void) f(1, 2, 3);
return;
}