mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
ast: Add type nodes
Copy all of the type classes from src/type into ast. Required the merging of: * type::Struct into the existing ast::Struct - ast::Struct now has a name. * type::AccessControl into the existing ast::AccessControl enumerator - The old ast::AccessControl enumerator is now ast::AccessControl::Access Bug: tint:724 Change-Id: Ibb950036ed551ec769c6d3d2c8fb411809cf6931 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48383 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
ba6f260629
commit
8a8d26bbd9
@@ -225,8 +225,9 @@ class InspectorHelper : public ProgramBuilder {
|
||||
decos.push_back(create<ast::StructBlockDecoration>());
|
||||
}
|
||||
|
||||
auto* str = create<ast::Struct>(members, decos);
|
||||
auto* str_ty = ty.struct_(name, str);
|
||||
auto sym = Sym(name);
|
||||
auto* str = create<ast::Struct>(sym, members, decos);
|
||||
auto* str_ty = ty.struct_(sym, str);
|
||||
AST().AddConstructedType(str_ty);
|
||||
return str_ty;
|
||||
}
|
||||
@@ -1824,6 +1825,7 @@ TEST_F(InspectorGetUniformBufferResourceBindingsTest, NonEntryPointFunc) {
|
||||
TEST_F(InspectorGetUniformBufferResourceBindingsTest, MissingBlockDeco) {
|
||||
ast::DecorationList decos;
|
||||
auto* str = create<ast::Struct>(
|
||||
Sym("foo_type"),
|
||||
ast::StructMemberList{Member(StructMemberName(0, ty.i32()), ty.i32())},
|
||||
decos);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user