// Copyright 2022 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/tint/lang/wgsl/sem/materialize.h"

TINT_INSTANTIATE_TYPEINFO(tint::sem::Materialize);

namespace tint::sem {
Materialize::Materialize(const ValueExpression* expr,
                         const Statement* statement,
                         const type::Type* type,
                         const constant::Value* constant)
    : Base(/* declaration */ expr->Declaration(),
           /* type */ type,
           /* stage */ constant ? EvaluationStage::kConstant : EvaluationStage::kNotEvaluated,
           /* statement */ statement,
           /* constant */ constant,
           /* has_side_effects */ false,
           /* root_ident */ expr->RootIdentifier()),
      expr_(expr) {}

Materialize::~Materialize() = default;

}  // namespace tint::sem
