1
Fork 0

Prevent the start_bx basic block in codegen from having two Builders at the same time

This commit is contained in:
823984418 2023-03-04 22:51:23 +08:00 committed by GitHub
parent 01b7a6a9ea
commit de2e16cf71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -258,6 +258,8 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
// Apply debuginfo to the newly allocated locals.
fx.debug_introduce_locals(&mut start_bx);
drop(start_bx);
// Codegen the body of each block using reverse postorder
for (bb, _) in traversal::reverse_postorder(&mir) {
fx.codegen_block(bb);