diff --git a/docs/LangRef.rst b/docs/LangRef.rst index 38248b454dd..cb615ebae76 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -1183,6 +1183,22 @@ Currently, only the following parameter attributes are defined: The sret type argument specifies the in memory type, which must be the same as the pointee type of the argument. +``elementtype()`` + + The ``elementtype`` argument attribute can be used to specify a pointer + element type in a way that is compatible with `opaque pointers + `. + + The ``elementtype`` attribute by itself does not carry any specific + semantics. However, certain intrinsics may require this attribute to be + present and assign it particular semantics. This will be documented on + individual intrinsics. + + The attribute may only be applied to pointer typed arguments of intrinsic + calls. It cannot be applied to non-intrinsic calls, and cannot be applied + to parameters on function declarations. For non-opaque pointers, the type + passed to ``elementtype`` must match the pointer element type. + .. _attr_align: ``align `` or ``align()``