Skip to content

Missing support for GCC's attribute access (IR attributes with size index?) #54312

@davidbolvansky

Description

@davidbolvansky

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes

access (access-mode, ref-index)
access (access-mode, ref-index, size-index)

The access attribute specifies that a function to whose by-reference arguments the attribute applies accesses the referenced object according to access-mode. The access-mode argument is required and must be one of four names: read_only, read_write, write_only, or none. The remaining two are positional arguments.

We have IR attributes read_only and write_only, so mapping for these two modes could be easy. In terms of size-index, maybe we could extend existing IR attributes to optionally take size-index?

cc @jdoerfert (IR attributes)
cc @fhahn (DSE)
cc @nikic (Rust side; can this generalization of IR attributes be useful for Rust?)

Metadata

Metadata

Assignees

Labels

clang:codegenIR generation bugs: mangling, exceptions, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions