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
6
namespace
P4::IR {
7
9
struct
SymbolicVariableEqual
{
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
19
struct
SymbolicVariableLess
{
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_ */
P4::IR::SymbolicVariableEqual
Equals for SymbolicVariable pointers. We only compare the label.
Definition
compare.h:9
P4::IR::SymbolicVariableLess
Less for SymbolicVariable pointers. We only compare the label.
Definition
compare.h:19
ir
compare.h
Generated by
1.12.0