mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
Use ProgramBuilder::Construct() where possible
Replace all calls to create<ast::TypeConstructorExpression>() with Construct(). TypeConstructorExpression will be folded into ast::CallExpression, but the Construct() call signature will remain identical. Bug: tint:888 Change-Id: Ifb28a90ccf5184c8090c2e32fa8c82f3996dfa33 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/69108 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
@@ -522,11 +522,11 @@ struct DecomposeMemoryAccess::State {
|
||||
values.emplace_back(b.Call(load, "buffer", offset));
|
||||
}
|
||||
}
|
||||
b.Func(name, params, CreateASTTypeFor(ctx, el_ty),
|
||||
{
|
||||
b.Return(b.create<ast::TypeConstructorExpression>(
|
||||
CreateASTTypeFor(ctx, el_ty), values)),
|
||||
});
|
||||
b.Func(
|
||||
name, params, CreateASTTypeFor(ctx, el_ty),
|
||||
{
|
||||
b.Return(b.Construct(CreateASTTypeFor(ctx, el_ty), values)),
|
||||
});
|
||||
}
|
||||
return name;
|
||||
});
|
||||
|
||||
@@ -715,7 +715,7 @@ struct State {
|
||||
LoadPrimitive(array_base, primitive_offset, buffer, base_format));
|
||||
}
|
||||
|
||||
return ctx.dst->create<ast::TypeConstructorExpression>(
|
||||
return ctx.dst->Construct(
|
||||
ctx.dst->create<ast::Vector>(base_type, count), std::move(expr_list));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user