dawn-cmake/src/tint/ir/to_program.h
Ben Clayton 9940c7bdcc [tint][ir][ToProgram] Stub ToProgram()
This is the first commit to implementing an IR -> AST conversion path.

Not much currently implemented, but enough to start building upon.

Started implementing AST -> IR -> AST roundtrip tests.

Bug: tint:1902
Change-Id: I17fa9f3bc609b48ecb916ab47ae61bfa36821b44
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131180
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-05-16 22:07:39 +00:00

35 lines
1.0 KiB
C++

// Copyright 2023 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.
#ifndef SRC_TINT_IR_TO_PROGRAM_H_
#define SRC_TINT_IR_TO_PROGRAM_H_
#include "src/tint/program.h"
namespace tint::ir {
class Module;
}
namespace tint::ir {
/// Builds a tint::Program from an ir::Module
/// @param module the IR module
/// @return the tint::Program.
/// @note Check the returned Program::Diagnostics() for any errors.
Program ToProgram(const Module& module);
} // namespace tint::ir
#endif // SRC_TINT_IR_TO_PROGRAM_H_