Skip to content
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

Fix attributes for donotdelete intrinsic #45010

Merged
merged 1 commit into from
Apr 17, 2022
Merged

Fix attributes for donotdelete intrinsic #45010

merged 1 commit into from
Apr 17, 2022

Conversation

Keno
Copy link
Member

@Keno Keno commented Apr 17, 2022

The change in #44793 changed the signature of the donotdelete intrinsic,
but didn't change the corresponding attributes, leaving a nonnull attribute
on a void return, which fails the verifier.

The change in #44793 changed the signature of the donotdelete intrinsic,
but didn't change the corresponding attributes, leaving a `nonnull` attribute
on a `void` return, which fails the verifier.
@@ -500,7 +500,7 @@ static AttributeList get_donotdelete_func_attrs(LLVMContext &C)
FnAttrs = FnAttrs.addAttribute(C, Attribute::NoUnwind);
return AttributeList::get(C,
FnAttrs,
Attributes(C, {Attribute::NonNull}),
Attributes(C, {}),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just use the default constructor of AttributeSet here instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably. I just submitted this as a quick drive-by while I was working on something else. Feel free to make a PR that fixes it better :).

@Keno Keno merged commit ce7c858 into master Apr 17, 2022
@Keno Keno deleted the kf/dndattrs branch April 17, 2022 22:18
@KristofferC KristofferC added backport 1.7 backport 1.8 Change should be backported to release-1.8 and removed backport 1.7 labels Apr 19, 2022
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants