diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -1183,6 +1183,22 @@ 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()``