Have TypesBuilder::F32() return ast::F32

Also contains a UBSAN fix for tests that didn't quite all migrate to ast::I32.

Bug: tint:724
Change-Id: I2a3ad6d6a69595b7da6bb502a87fb655a7f5961a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51486
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2021-05-19 19:51:22 +00:00
committed by Tint LUCI CQ
parent 06aa88aa97
commit 512d60c207
12 changed files with 226 additions and 163 deletions

View File

@@ -366,14 +366,12 @@ class ProgramBuilder {
}
/// @returns a f32 type
typ::F32 f32() const {
return {builder->create<ast::F32>(), builder->create<sem::F32>()};
}
typ::F32 f32() const { return {builder->create<ast::F32>()}; }
/// @param source the Source of the node
/// @returns a f32 type
typ::F32 f32(const Source& source) const {
return {builder->create<ast::F32>(source), builder->create<sem::F32>()};
return {builder->create<ast::F32>(source)};
}
/// @returns a i32 type