Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

shader: Use a non-trivial dummy to construct ASL node union

ReinUsesLispf2ab3993eb14
diff --git a/src/shader_recompiler/frontend/ir/abstract_syntax_list.h b/src/shader_recompiler/frontend/ir/abstract_syntax_list.h
index 1366414c25..e9afb4d92d 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 {
class Block;
struct AbstractSyntaxNode {
+ struct NonTrivialDummy {
+ NonTrivialDummy() {}
+ };
+
enum class Type {
Block,
If,
@@ -25,7 +29,8 @@ struct AbstractSyntaxNode {
};
Type type{};
union {
- Block* block{};
+ NonTrivialDummy dummy{};
+ Block* block;
struct {
U1 cond;
Block* body;