Demangler: Change signature of primary Demangle() function

Have this take a SymbolTable instead of a Program.
Program will be split into Program (immutable) and ProgramBuilder (mutable). We'll need Demangler to support both.

Bug: tint:390
Change-Id: I6447dd9674919d4867ed8ba126880cdfd9bf7128
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38550
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2021-01-26 16:57:10 +00:00
parent d7137d7233
commit 44bec80e5f
18 changed files with 124 additions and 172 deletions

View File

@@ -60,7 +60,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Expect the demangled AST printed with to_str() to match
tint::Demangler d;
ASSERT_EQ(d.Demangle(src, src.to_str()), d.Demangle(dst, dst.to_str()));
ASSERT_EQ(d.Demangle(src), d.Demangle(dst));
// Check that none of the AST nodes or type pointers in dst are found in src
std::unordered_set<tint::ast::Node*> src_nodes;