diff options
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/function.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/function.h b/src/shader_recompiler/frontend/ir/function.h new file mode 100644 index 000000000..2d4dc5b98 --- /dev/null +++ b/src/shader_recompiler/frontend/ir/function.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <memory> | ||
| 8 | #include <vector> | ||
| 9 | |||
| 10 | #include "shader_recompiler/frontend/ir/basic_block.h" | ||
| 11 | |||
| 12 | namespace Shader::IR { | ||
| 13 | |||
| 14 | struct Function { | ||
| 15 | struct InplaceDelete { | ||
| 16 | void operator()(IR::Block* block) const noexcept { | ||
| 17 | std::destroy_at(block); | ||
| 18 | } | ||
| 19 | }; | ||
| 20 | using UniqueBlock = std::unique_ptr<IR::Block, InplaceDelete>; | ||
| 21 | |||
| 22 | std::vector<UniqueBlock> blocks; | ||
| 23 | }; | ||
| 24 | |||
| 25 | } // namespace Shader::IR | ||