mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
Simplify calls to ast::Node::[to_]str()
Add helpers on Program and ProgramBuilder that significantly simplify usage. Also demangle - this also reduces a bunch of copy-pasta code. Change-Id: I6215c346e7f6e49c20aced058a6150603253ed93 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/39342 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
dd1b6fca9f
commit
708dc2d040
@@ -499,11 +499,7 @@ int main(int argc, const char** argv) {
|
||||
}
|
||||
|
||||
if (options.dump_ast) {
|
||||
auto ast_str = program->to_str();
|
||||
if (options.demangle) {
|
||||
ast_str = tint::Demangler().Demangle(program->Symbols(), ast_str);
|
||||
}
|
||||
std::cout << std::endl << ast_str << std::endl;
|
||||
std::cout << std::endl << program->to_str(options.demangle) << std::endl;
|
||||
}
|
||||
if (options.parse_only) {
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user