Resolver: Generate mapping for ast::Type -> sem::Type

Currently untestable as nothing currently calls Type(const ast::Type* ty).

Bug: tint:724
Change-Id: I92dd772acd758b0960a7e9a19f15c91414ab505c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49527
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2021-04-30 20:20:19 +00:00
committed by Commit Bot service account
parent f34cb1fe70
commit fbec46fba9
8 changed files with 127 additions and 53 deletions

View File

@@ -88,7 +88,9 @@ class Info {
}
private:
std::unordered_map<const CastableBase*, const sem::Node*> map;
// TODO(crbug.com/tint/724): Once finished, this map should be:
// std::unordered_map<const ast::Node*, const sem::Node*>
std::unordered_map<const CastableBase*, const CastableBase*> map;
};
} // namespace sem

View File

@@ -27,6 +27,7 @@ class Function;
class MemberAccessorExpression;
class Statement;
class StructMember;
class Type;
class Variable;
} // namespace ast
@@ -42,6 +43,7 @@ class Statement;
class Struct;
class StructType;
class StructMember;
class Type;
class Variable;
/// TypeMappings is a struct that holds undefined `operator()` methods that's
@@ -58,6 +60,7 @@ struct TypeMappings {
Statement* operator()(ast::Statement*);
Struct* operator()(sem::StructType*);
StructMember* operator()(ast::StructMember*);
Type* operator()(ast::Type*);
Variable* operator()(ast::Variable*);
//! @endcond
};