diff options
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/function.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/shader_recompiler/frontend/ir/function.h b/src/shader_recompiler/frontend/ir/function.h index 2d4dc5b98..bba7d1d39 100644 --- a/src/shader_recompiler/frontend/ir/function.h +++ b/src/shader_recompiler/frontend/ir/function.h | |||
| @@ -4,22 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <boost/container/small_vector.hpp> |
| 8 | #include <vector> | ||
| 9 | 8 | ||
| 10 | #include "shader_recompiler/frontend/ir/basic_block.h" | 9 | #include "shader_recompiler/frontend/ir/basic_block.h" |
| 11 | 10 | ||
| 12 | namespace Shader::IR { | 11 | namespace Shader::IR { |
| 13 | 12 | ||
| 14 | struct Function { | 13 | struct Function { |
| 15 | struct InplaceDelete { | 14 | boost::container::small_vector<Block*, 16> blocks; |
| 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 | }; | 15 | }; |
| 24 | 16 | ||
| 25 | } // namespace Shader::IR | 17 | } // namespace Shader::IR |