Change generators to take a pointer instead of move.

This CL changes the generators so we don't have to move the module into
the generator. This will then allow calling the demangler at a later
point and still having access to the module.

Change-Id: Icad16ddb2b89921cbb174cf7fec520c410139285
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36942
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
dan sinclair
2021-01-11 16:24:32 +00:00
committed by dan sinclair
parent 7d152e0936
commit b920e604b2
15 changed files with 68 additions and 19 deletions

View File

@@ -66,7 +66,7 @@ class TransformTest : public testing::Test {
// Release the source module to ensure there's no uncloned data in result
{ auto tmp = std::move(module); }
writer::wgsl::Generator generator(std::move(result.module));
writer::wgsl::Generator generator(&(result.module));
if (!generator.Generate()) {
return "WGSL writer failed:\n" + generator.error();
}