summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/ir/value.h')
-rw-r--r--src/shader_recompiler/frontend/ir/value.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/ir/value.h b/src/shader_recompiler/frontend/ir/value.h
index 5425e42a1..7b20824ed 100644
--- a/src/shader_recompiler/frontend/ir/value.h
+++ b/src/shader_recompiler/frontend/ir/value.h
@@ -34,7 +34,7 @@ struct AssociatedInsts;
34 34
35class Value { 35class Value {
36public: 36public:
37 Value() noexcept : type{IR::Type::Void}, inst{nullptr} {} 37 Value() noexcept = default;
38 explicit Value(IR::Inst* value) noexcept; 38 explicit Value(IR::Inst* value) noexcept;
39 explicit Value(IR::Block* value) noexcept; 39 explicit Value(IR::Block* value) noexcept;
40 explicit Value(IR::Reg value) noexcept; 40 explicit Value(IR::Reg value) noexcept;
@@ -78,9 +78,9 @@ public:
78private: 78private:
79 void ValidateAccess(IR::Type expected) const; 79 void ValidateAccess(IR::Type expected) const;
80 80
81 IR::Type type; 81 IR::Type type{};
82 union { 82 union {
83 IR::Inst* inst; 83 IR::Inst* inst{};
84 IR::Block* label; 84 IR::Block* label;
85 IR::Reg reg; 85 IR::Reg reg;
86 IR::Pred pred; 86 IR::Pred pred;
@@ -95,6 +95,7 @@ private:
95 f64 imm_f64; 95 f64 imm_f64;
96 }; 96 };
97}; 97};
98static_assert(static_cast<u32>(IR::Type::Void) == 0, "memset relies on IR::Type being zero");
98static_assert(std::is_trivially_copyable_v<Value>); 99static_assert(std::is_trivially_copyable_v<Value>);
99 100
100template <IR::Type type_> 101template <IR::Type type_>