Add semantic::Node

Rename Program(Builder)::Nodes to ASTNodes, and add SemNodes.

Bug: tint:390
Change-Id: If501ea5f5d1cbb4bc2673b303aa8ebce7195e2c3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/39005
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2021-01-29 15:17:30 +00:00
committed by Commit Bot service account
parent e43c830b14
commit 7fdfff1de4
9 changed files with 121 additions and 40 deletions

View File

@@ -65,14 +65,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Check that none of the AST nodes or type pointers in dst are found in src
std::unordered_set<tint::ast::Node*> src_nodes;
for (auto* src_node : src.Nodes().Objects()) {
for (auto* src_node : src.ASTNodes().Objects()) {
src_nodes.emplace(src_node);
}
std::unordered_set<tint::type::Type*> src_types;
for (auto* src_type : src.Types()) {
src_types.emplace(src_type);
}
for (auto* dst_node : dst.Nodes().Objects()) {
for (auto* dst_node : dst.ASTNodes().Objects()) {
ASSERT_EQ(src_nodes.count(dst_node), 0u);
}
for (auto* dst_type : dst.Types()) {