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 baf0669 commit 76fa893
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ 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 76fa893

Please sign in to comment.