summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-05-15 18:18:31 -0300
committerGravatar ameerj2021-07-22 21:51:31 -0400
commit776ab3ea12f07e2d434a26857d412cff018b1b50 (patch)
tree0b1631b3e16ecb7eae8af43309d1cc60895d4f88 /src/shader_recompiler/frontend/ir
parentemit_spirv: Jump to loop body with local variable (diff)
downloadyuzu-776ab3ea12f07e2d434a26857d412cff018b1b50.tar.gz
yuzu-776ab3ea12f07e2d434a26857d412cff018b1b50.tar.xz
yuzu-776ab3ea12f07e2d434a26857d412cff018b1b50.zip
shader: Use a non-trivial dummy to construct ASL node union
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
-rw-r--r--src/shader_recompiler/frontend/ir/abstract_syntax_list.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shader_recompiler/frontend/ir/abstract_syntax_list.h b/src/shader_recompiler/frontend/ir/abstract_syntax_list.h
index 1366414c2..e9afb4d92 100644
--- a/src/shader_recompiler/frontend/ir/abstract_syntax_list.h
+++ b/src/shader_recompiler/frontend/ir/abstract_syntax_list.h
@@ -13,6 +13,10 @@ namespace Shader::IR {
13class Block; 13class Block;
14 14
15struct AbstractSyntaxNode { 15struct AbstractSyntaxNode {
16 struct NonTrivialDummy {
17 NonTrivialDummy() {}
18 };
19
16 enum class Type { 20 enum class Type {
17 Block, 21 Block,
18 If, 22 If,
@@ -25,7 +29,8 @@ struct AbstractSyntaxNode {
25 }; 29 };
26 Type type{}; 30 Type type{};
27 union { 31 union {
28 Block* block{}; 32 NonTrivialDummy dummy{};
33 Block* block;
29 struct { 34 struct {
30 U1 cond; 35 U1 cond;
31 Block* body; 36 Block* body;