blob: f5952ea587619c14136d727e0dfe2517127e5d96 [file] [log] [blame]
dan sinclair5aa7ef22023-04-26 00:08:35 +00001// Copyright 2023 The Tint Authors.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#include "src/tint/ir/unary.h"
16#include "src/tint/debug.h"
17
18TINT_INSTANTIATE_TYPEINFO(tint::ir::Unary);
19
20namespace tint::ir {
21
dan sinclair0d80c3d2023-06-19 13:32:03 +000022Unary::Unary(InstructionResult* result, enum Kind k, Value* val) : kind_(k) {
dan sinclair4934dc02023-06-16 12:11:56 +000023 AddOperand(Unary::kValueOperandOffset, val);
dan sinclair0d80c3d2023-06-19 13:32:03 +000024 AddResult(result);
dan sinclair5aa7ef22023-04-26 00:08:35 +000025}
26
27Unary::~Unary() = default;
28
dan sinclair5aa7ef22023-04-26 00:08:35 +000029} // namespace tint::ir