ast::Builder: Add shortcuts to the Program methods

This builder will be merged into ProgramBuilder, where these will become methods.
To breakup this change, perform the refactoring as a separate change.

Bug: tint:390
Change-Id: I2c9151cd9f198e99d88eaf296dd994293df6c425
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38720
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2021-01-26 16:57:10 +00:00
parent 8d391f7a10
commit 1f7e18bbc0
29 changed files with 496 additions and 498 deletions

View File

@@ -80,8 +80,8 @@ TEST_F(StorageTextureTest, TypeName) {
}
TEST_F(StorageTextureTest, F32) {
Type* s = mod->create<StorageTexture>(TextureDimension::k2dArray,
ImageFormat::kRgba32Float);
Type* s = create<StorageTexture>(TextureDimension::k2dArray,
ImageFormat::kRgba32Float);
TypeDeterminer td(mod);
ASSERT_TRUE(td.Determine()) << td.error();
@@ -91,8 +91,8 @@ TEST_F(StorageTextureTest, F32) {
}
TEST_F(StorageTextureTest, U32) {
Type* s = mod->create<StorageTexture>(TextureDimension::k2dArray,
ImageFormat::kRg32Uint);
Type* s = create<StorageTexture>(TextureDimension::k2dArray,
ImageFormat::kRg32Uint);
TypeDeterminer td(mod);
ASSERT_TRUE(td.Determine()) << td.error();
@@ -102,8 +102,8 @@ TEST_F(StorageTextureTest, U32) {
}
TEST_F(StorageTextureTest, I32) {
Type* s = mod->create<StorageTexture>(TextureDimension::k2dArray,
ImageFormat::kRgba32Sint);
Type* s = create<StorageTexture>(TextureDimension::k2dArray,
ImageFormat::kRgba32Sint);
TypeDeterminer td(mod);
ASSERT_TRUE(td.Determine()) << td.error();

View File

@@ -35,7 +35,7 @@ class TestHelperBase : public BASE, public ast::BuilderWithProgram {
/// @param s the string to demangle
/// @returns the demangled string
std::string demangle(const std::string& s) {
return demanger.Demangle(mod->Symbols(), s);
return demanger.Demangle(Symbols(), s);
}
/// A demangler