shader: Use a non-trivial dummy to construct ASL node union
This commit is contained in:
parent
38e7b8c805
commit
776ab3ea12
1 changed files with 6 additions and 1 deletions
|
@ -13,6 +13,10 @@ namespace Shader::IR {
|
||||||
class Block;
|
class Block;
|
||||||
|
|
||||||
struct AbstractSyntaxNode {
|
struct AbstractSyntaxNode {
|
||||||
|
struct NonTrivialDummy {
|
||||||
|
NonTrivialDummy() {}
|
||||||
|
};
|
||||||
|
|
||||||
enum class Type {
|
enum class Type {
|
||||||
Block,
|
Block,
|
||||||
If,
|
If,
|
||||||
|
@ -25,7 +29,8 @@ struct AbstractSyntaxNode {
|
||||||
};
|
};
|
||||||
Type type{};
|
Type type{};
|
||||||
union {
|
union {
|
||||||
Block* block{};
|
NonTrivialDummy dummy{};
|
||||||
|
Block* block;
|
||||||
struct {
|
struct {
|
||||||
U1 cond;
|
U1 cond;
|
||||||
Block* body;
|
Block* body;
|
||||||
|
|
Loading…
Reference in a new issue