dawn-cmake/src/ast/group_decoration.cc
Ben Clayton 5c243f824c Rename CloneContext::mod to CloneContext::dst
In the future, CloneContext will be operating on `Program`s so a field called `mod` is poorly named.
CloneContext has a `src` member, so rename to `dst` to keep symmetry.

Bug: tint:390
Change-Id: Ic724f8a18b46ef719790394cdc810f7eb3681234
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38364
Commit-Queue: David Neto <dneto@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2021-01-22 13:41:06 +00:00

41 lines
1.3 KiB
C++

// Copyright 2020 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/ast/group_decoration.h"
#include "src/ast/module.h"
#include "src/clone_context.h"
TINT_INSTANTIATE_CLASS_ID(tint::ast::GroupDecoration);
namespace tint {
namespace ast {
GroupDecoration::GroupDecoration(const Source& source, uint32_t val)
: Base(source), value_(val) {}
GroupDecoration::~GroupDecoration() = default;
void GroupDecoration::to_str(std::ostream& out, size_t indent) const {
make_indent(out, indent);
out << "GroupDecoration{" << value_ << "}" << std::endl;
}
GroupDecoration* GroupDecoration::Clone(CloneContext* ctx) const {
return ctx->dst->create<GroupDecoration>(ctx->Clone(source()), value_);
}
} // namespace ast
} // namespace tint