-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MIR] Add Storage{Live,Dead} statements to emit llvm.lifetime.{start,end}. #35409
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,7 +238,8 @@ pub fn construct_const<'a, 'gcx, 'tcx>(hir: Cx<'a, 'gcx, 'tcx>, | |
let span = tcx.map.span(item_id); | ||
let mut builder = Builder::new(hir, span); | ||
|
||
let extent = ROOT_CODE_EXTENT; | ||
let extent = tcx.region_maps.temporary_scope(ast_expr.id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a bug -- but was your discovery of it prompted by some test case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Existing constant expression testcases started failing. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No, just trying to understand where this change came from; it seemed kind of out of the blue. I'm a bit confused still though. What is |
||
.unwrap_or(ROOT_CODE_EXTENT); | ||
let mut block = START_BLOCK; | ||
let _ = builder.in_scope(extent, block, |builder| { | ||
let expr = builder.hir.mirror(ast_expr); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make a helper function in cfg, since you’re constructing this multiple times manually.
This should become
this.cfg.push_storage_live(source_info, temp);