2020-03-02 12:47:43 -08:00
|
|
|
// 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.
|
|
|
|
|
2022-02-21 07:19:07 -08:00
|
|
|
#include "src/tint/ast/break_statement.h"
|
2020-03-02 12:47:43 -08:00
|
|
|
|
2022-02-21 07:19:07 -08:00
|
|
|
#include "src/tint/program_builder.h"
|
2020-12-01 10:04:17 -08:00
|
|
|
|
2021-03-02 12:51:18 -08:00
|
|
|
TINT_INSTANTIATE_TYPEINFO(tint::ast::BreakStatement);
|
2020-12-02 10:19:28 -08:00
|
|
|
|
2020-03-02 12:47:43 -08:00
|
|
|
namespace tint {
|
|
|
|
namespace ast {
|
|
|
|
|
2021-10-15 10:33:10 -07:00
|
|
|
BreakStatement::BreakStatement(ProgramID pid, const Source& src)
|
|
|
|
: Base(pid, src) {}
|
2020-03-05 12:29:13 -08:00
|
|
|
|
2020-04-09 11:52:06 -07:00
|
|
|
BreakStatement::BreakStatement(BreakStatement&&) = default;
|
|
|
|
|
2020-03-02 12:47:43 -08:00
|
|
|
BreakStatement::~BreakStatement() = default;
|
|
|
|
|
2021-10-19 11:38:54 -07:00
|
|
|
const BreakStatement* BreakStatement::Clone(CloneContext* ctx) const {
|
2021-02-11 12:27:14 -08:00
|
|
|
// Clone arguments outside of create() call to have deterministic ordering
|
2021-10-15 10:33:10 -07:00
|
|
|
auto src = ctx->Clone(source);
|
2021-02-11 12:27:14 -08:00
|
|
|
return ctx->dst->create<BreakStatement>(src);
|
2020-12-01 10:04:17 -08:00
|
|
|
}
|
|
|
|
|
2020-03-02 12:47:43 -08:00
|
|
|
} // namespace ast
|
|
|
|
} // namespace tint
|