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 11, 2024
1 parent 9f8b069 commit 62ebeaa
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 62ebeaa

Please sign in to comment.