[sledge] Add check that frontend preserves sizes of types

Reviewed By: jvillard

Differential Revision: D24772953

fbshipit-source-id: 269f0d7cb
master
Josh Berdine 4 years ago committed by Facebook GitHub Bot
parent e415b8f22e
commit 0c17ac4281

@ -306,7 +306,12 @@ let rec xlate_type : x -> Llvm.lltype -> Typ.t =
;
xlate_type_ llt
|>
[%Trace.retn fun {pf} -> pf "%a" Typ.pp_defn] )
[%Trace.retn fun {pf} ty ->
pf "%a" Typ.pp_defn ty ;
assert (
(not (Llvm.type_is_sized llt))
|| (not (Typ.is_sized ty))
|| Typ.size_of ty = size_of x llt )] )
and xlate_type_opt : x -> Llvm.lltype -> Typ.t option =
fun x llt ->

Loading…
Cancel
Save