dan sinclair | 5aa7ef2 | 2023-04-26 00:08:35 +0000 | [diff] [blame] | 1 | // 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 | |
| 18 | TINT_INSTANTIATE_TYPEINFO(tint::ir::Unary); |
| 19 | |
| 20 | namespace tint::ir { |
| 21 | |
dan sinclair | 0d80c3d | 2023-06-19 13:32:03 +0000 | [diff] [blame] | 22 | Unary::Unary(InstructionResult* result, enum Kind k, Value* val) : kind_(k) { |
dan sinclair | 4934dc0 | 2023-06-16 12:11:56 +0000 | [diff] [blame] | 23 | AddOperand(Unary::kValueOperandOffset, val); |
dan sinclair | 0d80c3d | 2023-06-19 13:32:03 +0000 | [diff] [blame] | 24 | AddResult(result); |
dan sinclair | 5aa7ef2 | 2023-04-26 00:08:35 +0000 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | Unary::~Unary() = default; |
| 28 | |
dan sinclair | 5aa7ef2 | 2023-04-26 00:08:35 +0000 | [diff] [blame] | 29 | } // namespace tint::ir |