File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ concept IRAdaptor = requires(T a) {
109109 requires requires (typename T::IRValueRef r, typename T::IRValueRef w) {
110110 { r == T::INVALID_VALUE_REF } -> std::convertible_to<bool >;
111111 { r != T::INVALID_VALUE_REF } -> std::convertible_to<bool >;
112- { r < w } -> std::convertible_to<bool >;
113112 };
114113
115114
Original file line number Diff line number Diff line change @@ -120,15 +120,32 @@ struct TestIR {
120120 void print () const noexcept ;
121121};
122122
123+ class IRValueRef {
124+ u32 val;
125+
126+ public:
127+ explicit constexpr IRValueRef (u32 val) : val(val) {}
128+ explicit constexpr operator u32 () const { return val; }
129+ bool operator ==(const IRValueRef &other) const { return val == other.val ; }
130+ };
131+
132+ class IRInstRef {
133+ u32 val;
134+
135+ public:
136+ explicit constexpr IRInstRef (u32 val) : val(val) {}
137+ explicit constexpr operator u32 () const { return val; }
138+ explicit constexpr operator IRValueRef () const { return IRValueRef (val); }
139+ bool operator ==(const IRInstRef &other) const { return val == other.val ; }
140+ };
141+
123142struct TestIRAdaptor {
124143 TestIR *ir;
125144
126145 explicit TestIRAdaptor (TestIR *ir) : ir(ir) {}
127146
128- enum class IRValueRef : u32 {
129- };
130- enum class IRInstRef : u32 {
131- };
147+ using IRValueRef = tpde::test::IRValueRef;
148+ using IRInstRef = tpde::test::IRInstRef;
132149 enum class IRBlockRef : u32 {
133150 };
134151 enum class IRFuncRef : u32 {
You can’t perform that action at this time.
0 commit comments