Skip to content

Commit

Permalink
Codegen Stmt:decl when seeing StorageLive
Browse files Browse the repository at this point in the history
  • Loading branch information
karkhaz committed Mar 12, 2024
1 parent 39a1c59 commit d4a82ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ impl<'tcx> GotocCtx<'tcx> {
.goto_expr;
self.codegen_set_discriminant(dest_ty, dest_expr, *variant_index, location)
}
StatementKind::StorageLive(_) => Stmt::skip(location), // TODO: fix me
StatementKind::StorageLive(var_id) => {
Stmt::decl(self.codegen_local(*var_id), None, location)
}
StatementKind::StorageDead(var_id) => Stmt::dead(self.codegen_local(*var_id), location),
StatementKind::Intrinsic(NonDivergingIntrinsic::CopyNonOverlapping(
CopyNonOverlapping { src, dst, count },
Expand Down

0 comments on commit d4a82ab

Please sign in to comment.