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

Add support for immutable strings. #92

Merged
merged 1 commit into from
May 23, 2024

Conversation

tsymalla
Copy link
Contributor

We want a way to store strings in a global variable by passing in a
StringRef to an op, but we don't want to generate a setter for it, since
we currently don't inject the builder into the setter. So, add an
immutable string type based on the existing isImmutable option for
attributes.

Based on #91

Copy link
Member

@nhaehnle nhaehnle left a comment

Choose a reason for hiding this comment

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

Thanks! Just two comments on the relevant commit here.

include/llvm-dialects/Dialect/Dialect.td Outdated Show resolved Hide resolved
example/ExampleMain.cpp Show resolved Hide resolved
@tsymalla tsymalla force-pushed the add_stringattr branch 2 times, most recently from 669b751 to 185bb13 Compare May 22, 2024 08:10
Copy link
Member

@nhaehnle nhaehnle left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! (looks like the test failures are all covered by the discussionin #93)

We want a way to store strings in a global variable by passing in a
StringRef to an op, but we don't want to generate a setter for it, since
we currently don't inject the builder into the setter. So, add an
immutable string type based on the existing isImmutable option for
attributes.
@tsymalla-AMD tsymalla-AMD merged commit ed4b46e into GPUOpen-Drivers:dev May 23, 2024
8 checks passed
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