2021-04-07 08:09:21 +00:00
|
|
|
// Copyright 2021 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/internal_decoration.h"
|
|
|
|
|
|
|
|
TINT_INSTANTIATE_TYPEINFO(tint::ast::InternalDecoration);
|
|
|
|
|
|
|
|
namespace tint {
|
|
|
|
namespace ast {
|
|
|
|
|
2021-04-13 23:27:27 +00:00
|
|
|
InternalDecoration::InternalDecoration(ProgramID program_id)
|
|
|
|
: Base(program_id, Source{}) {}
|
2021-04-07 08:09:21 +00:00
|
|
|
|
|
|
|
InternalDecoration::~InternalDecoration() = default;
|
|
|
|
|
2021-06-09 18:53:57 +00:00
|
|
|
std::string InternalDecoration::name() const {
|
|
|
|
return "internal";
|
|
|
|
}
|
|
|
|
|
2021-04-16 19:07:51 +00:00
|
|
|
void InternalDecoration::to_str(const sem::Info&,
|
2021-04-07 08:09:21 +00:00
|
|
|
std::ostream& out,
|
|
|
|
size_t indent) const {
|
|
|
|
make_indent(out, indent);
|
2021-06-09 18:53:57 +00:00
|
|
|
out << "tint_internal(" << InternalName() << ")" << std::endl;
|
2021-04-07 08:09:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace ast
|
|
|
|
} // namespace tint
|