main: Print WGSL from correct program

PrintWGSL() was using the moved program, triggering an ICE

Change-Id: I8976feac8712cc883d1b1b4bdca35a929bcb846a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53040
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2021-06-02 20:01:54 +00:00 committed by Tint LUCI CQ
parent 94ac078990
commit e3cd216e29
1 changed files with 1 additions and 1 deletions

View File

@ -802,7 +802,7 @@ int main(int argc, const char** argv) {
}
if (!writer->Generate()) {
PrintWGSL(std::cerr, out.program);
PrintWGSL(std::cerr, *program);
std::cerr << "Failed to generate: " << writer->error() << std::endl;
return 1;
}