aboutsummaryrefslogtreecommitdiff
path: root/src/RangeSet.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/RangeSet.zig')
-rw-r--r--src/RangeSet.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/RangeSet.zig b/src/RangeSet.zig
index 84cae34365..a5007ef7c8 100644
--- a/src/RangeSet.zig
+++ b/src/RangeSet.zig
@@ -35,8 +35,8 @@ pub fn add(
src: SwitchProngSrc,
) !?SwitchProngSrc {
for (self.ranges.items) |range| {
- if (last.compare(.gte, range.first, ty, self.module) and
- first.compare(.lte, range.last, ty, self.module))
+ if (last.compareAll(.gte, range.first, ty, self.module) and
+ first.compareAll(.lte, range.last, ty, self.module))
{
return range.src; // They overlap.
}
@@ -53,7 +53,7 @@ const LessThanContext = struct { ty: Type, module: *Module };
/// Assumes a and b do not overlap
fn lessThan(ctx: LessThanContext, a: Range, b: Range) bool {
- return a.first.compare(.lt, b.first, ctx.ty, ctx.module);
+ return a.first.compareAll(.lt, b.first, ctx.ty, ctx.module);
}
pub fn spans(self: *RangeSet, first: Value, last: Value, ty: Type) !bool {