-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.9] Add the drop_deinit instruction #65094
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
Changes from all commits
f6d7634
45abc32
8920637
7134335
dbc9f74
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 |
---|---|---|
|
@@ -2385,7 +2385,7 @@ struct DeallocatorConventions : Conventions { | |
|
||
ParameterConvention | ||
getIndirectSelfParameter(const AbstractionPattern &type) const override { | ||
llvm_unreachable("Deallocators do not have indirect self parameters"); | ||
return ParameterConvention::Indirect_In; | ||
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. I'm curious about why this change was needed. 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 is for supporting deinits which get the self argument as indirect argument, which is the case for move-only types. |
||
} | ||
|
||
static bool classof(const Conventions *C) { | ||
|
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.
If the instruction is only valid in OSSA, isn't this not necessary because reaching IRGen is unexpected / an error?
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.
True. This could be an unreachable.
I just copied from
visitMoveValueInst
.But you are right, we should replace both visit functions with unreachable