mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +00:00
Move the ast node ownership from Context to Module
Fixes: tint:335 Change-Id: I128e229daa56d43e7227ecab72269be33b3ee012 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33240 Commit-Queue: Ben Clayton <bclayton@google.com> Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
627732c408
commit
2f4096b0d7
@@ -76,13 +76,13 @@ class BoundArrayAccessorsTest : public testing::Test {
|
||||
|
||||
Manager* manager() { return manager_.get(); }
|
||||
|
||||
/// Creates a new `ast::Node` owned by the Context. When the Context is
|
||||
/// Creates a new `ast::Node` owned by the Module. When the Module is
|
||||
/// destructed, the `ast::Node` will also be destructed.
|
||||
/// @param args the arguments to pass to the type constructor
|
||||
/// @returns the node pointer
|
||||
template <typename T, typename... ARGS>
|
||||
T* create(ARGS&&... args) {
|
||||
return ctx_.create<T>(std::forward<ARGS>(args)...);
|
||||
return mod_.create<T>(std::forward<ARGS>(args)...);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -44,13 +44,13 @@ class Transformer {
|
||||
const std::string& error() { return error_; }
|
||||
|
||||
protected:
|
||||
/// Creates a new `ast::Node` owned by the Context. When the Context is
|
||||
/// Creates a new `ast::Node` owned by the Module. When the Module is
|
||||
/// destructed, the `ast::Node` will also be destructed.
|
||||
/// @param args the arguments to pass to the type constructor
|
||||
/// @returns the node pointer
|
||||
template <typename T, typename... ARGS>
|
||||
T* create(ARGS&&... args) {
|
||||
return ctx_->create<T>(std::forward<ARGS>(args)...);
|
||||
return mod_->create<T>(std::forward<ARGS>(args)...);
|
||||
}
|
||||
|
||||
/// The context
|
||||
|
||||
@@ -86,13 +86,13 @@ class VertexPullingTransformHelper {
|
||||
Manager* manager() { return manager_.get(); }
|
||||
VertexPullingTransform* transform() { return transform_; }
|
||||
|
||||
/// Creates a new `ast::Node` owned by the Context. When the Context is
|
||||
/// Creates a new `ast::Node` owned by the Module. When the Module is
|
||||
/// destructed, the `ast::Node` will also be destructed.
|
||||
/// @param args the arguments to pass to the type constructor
|
||||
/// @returns the node pointer
|
||||
template <typename T, typename... ARGS>
|
||||
T* create(ARGS&&... args) {
|
||||
return ctx_.create<T>(std::forward<ARGS>(args)...);
|
||||
return mod_->create<T>(std::forward<ARGS>(args)...);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user