File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 25
25
26
26
namespace wasm ::analysis {
27
27
28
+ // A lattice created by "lifting" another lattice by inserting a new bottom
29
+ // element that is less than all elements in the lifted lattice.
28
30
template <Lattice L> struct Lift {
31
+ // Represent the bottom element as an empty optional and any element of the
32
+ // lifted lattice as a non-empty optional. This representation is
33
+ // intentionally part of the public API.
29
34
struct Element : std::optional<typename L::Element> {
30
35
bool isBottom () const noexcept { return !this ->has_value (); }
31
36
bool operator ==(const Element& other) const noexcept {
@@ -66,8 +71,6 @@ template<Lattice L> struct Lift {
66
71
return lattice.join (*self, *other);
67
72
}
68
73
}
69
-
70
- L& getLattice () noexcept { return lattice; }
71
74
};
72
75
73
76
#if __cplusplus >= 202002L
Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ TEST(LiftLattice, GetVal) {
320
320
321
321
TEST (LiftLattice, Compare) {
322
322
analysis::Lift lift{analysis::Flat<bool >{}};
323
- auto & liftee = lift.getLattice () ;
323
+ auto & liftee = lift.lattice ;
324
324
auto bot = lift.getBottom ();
325
325
auto lifteeBot = lift.get (liftee.getBottom ());
326
326
auto a = lift.get (liftee.get (false ));
You can’t perform that action at this time.
0 commit comments