mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Add ProgramBuilder::Wrap()
Follows the basic shallow-clone pattern of type::Manager::Wrap(), which this new method uses. Use ProgramBuilder::Wrap() in the writers, where we were previously using type::Manager::Wrap(). This simplifies some of the logic (especially around AppendVector()). This is now required as semantic information is generated inside the writers for newly constructed AST nodes, and we need to register this semantic info so it can be fetched later. Change-Id: Ia362204a1f13054e50545baeb7d269f210a36826 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/39004 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
708dc2d040
commit
e43c830b14
@@ -68,6 +68,8 @@ class Manager {
|
||||
/// of an existing immutable Manager.
|
||||
/// As the copied types are owned by `inner`, `inner` must not be destructed
|
||||
/// or assigned while using the returned Manager.
|
||||
/// TODO(bclayton) - Evaluate whether there are safer alternatives to this
|
||||
/// function. See crbug.com/tint/460.
|
||||
/// @param inner the immutable Manager to extend
|
||||
/// @return the Manager that wraps `inner`
|
||||
static Manager Wrap(const Manager& inner) {
|
||||
|
||||
Reference in New Issue
Block a user