diff options
Diffstat (limited to '')
-rw-r--r-- | src/PureUtils.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PureUtils.ml b/src/PureUtils.ml index f12ed87b..6ae8184d 100644 --- a/src/PureUtils.ml +++ b/src/PureUtils.ml @@ -101,6 +101,8 @@ let ty_as_integer (t : ty) : T.integer_type = let type_def_is_enum (def : T.type_def) : bool = match def.kind with T.Struct _ -> false | Enum _ -> true +let mk_result_ty (ty : ty) : ty = Adt (Assumed Result, [ ty ]) + let mk_result_fail_rvalue (ty : ty) : typed_rvalue = let ty = Adt (Assumed Result, [ ty ]) in let value = RvAdt { variant_id = Some result_fail_id; field_values = [] } in @@ -125,8 +127,6 @@ let mk_result_return_lvalue (v : typed_lvalue) : typed_lvalue = in { value; ty } -let mk_result_ty (ty : ty) : ty = Adt (Assumed Result, [ ty ]) - let compute_constant_value_ty (cv : constant_value) : ty = match cv with | V.Scalar sv -> Integer sv.V.int_ty |