P4C
The P4 Compiler
Loading...
Searching...
No Matches
compare.h
1#ifndef IR_COMPARE_H_
2#define IR_COMPARE_H_
3
4#include "ir/ir.h"
5
6namespace P4::IR {
7
10 bool operator()(const IR::SymbolicVariable *s1, const IR::SymbolicVariable *s2) const {
11 return s1->label == s2->label;
12 }
13 bool operator()(const IR::SymbolicVariable &s1, const IR::SymbolicVariable &s2) const {
14 return s1.label == s2.label;
15 }
16};
17
20 bool operator()(const IR::SymbolicVariable *s1, const IR::SymbolicVariable *s2) const {
21 return *s1 < *s2;
22 }
23 bool operator()(const IR::SymbolicVariable &s1, const IR::SymbolicVariable &s2) const {
24 return s1 < s2;
25 }
26};
27
28} // namespace P4::IR
29
30#endif /* IR_COMPARE_H_ */
Equals for SymbolicVariable pointers. We only compare the label.
Definition compare.h:9
Less for SymbolicVariable pointers. We only compare the label.
Definition compare.h:19