commit | 16cb4bd7dd169b5e6152ab28505ed9ebdf85a5b0 | [log] [tgz] |
---|---|---|
author | dan sinclair <dsinclair@chromium.org> | Thu Sep 21 08:52:11 2023 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Sep 21 08:52:11 2023 +0000 |
tree | 15db597a2193726fbd5b210540b5b9a6053a75af | |
parent | eea786fd652c79be1557e946dc93771bf536da32 [diff] [blame] |
[ir] Add ability to clone in the IR. Add support for cloning in the IR. This CL is based off of https://dawn-review.googlesource.com/c/dawn/+/152400 Bug: tint:1718 Change-Id: I8fce30872ad2c02c59363d2cd8b5771917d97342 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/152221 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/lang/core/ir/unreachable.cc b/src/tint/lang/core/ir/unreachable.cc index 0011530..da73d70 100644 --- a/src/tint/lang/core/ir/unreachable.cc +++ b/src/tint/lang/core/ir/unreachable.cc
@@ -14,10 +14,17 @@ #include "src/tint/lang/core/ir/unreachable.h" +#include "src/tint/lang/core/ir/clone_context.h" +#include "src/tint/lang/core/ir/module.h" + TINT_INSTANTIATE_TYPEINFO(tint::core::ir::Unreachable); namespace tint::core::ir { Unreachable::~Unreachable() = default; +Unreachable* Unreachable::Clone(CloneContext& ctx) { + return ctx.ir.instructions.Create<Unreachable>(); +} + } // namespace tint::core::ir