summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir/function.h
blob: 2d4dc5b981a8852f3479eaffd8cbbea7c2dfbb4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

#include <memory>
#include <vector>

#include "shader_recompiler/frontend/ir/basic_block.h"

namespace Shader::IR {

struct Function {
    struct InplaceDelete {
        void operator()(IR::Block* block) const noexcept {
            std::destroy_at(block);
        }
    };
    using UniqueBlock = std::unique_ptr<IR::Block, InplaceDelete>;

    std::vector<UniqueBlock> blocks;
};

} // namespace Shader::IR