[PATCH] D105407: [LangRef] Add elementtype attribute

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 6 13:11:03 PDT 2021


nikic updated this revision to Diff 356806.
nikic added a comment.

Restrict attribute to intrinsics and calls only.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105407/new/

https://reviews.llvm.org/D105407

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -1165,6 +1165,22 @@
     The sret type argument specifies the in memory type, which must be
     the same as the pointee type of the argument.
 
+``elementtype(<ty>)``
+
+    The ``elementtype`` argument attribute can be used to specify a pointer
+    element type in a way that is compatible with `opaque pointers
+    <OpaquePointers.html>`.
+
+    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 <n>`` or ``align(<n>)``


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105407.356806.patch
Type: text/x-patch
Size: 1113 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210706/fd9a6b1e/attachment-0001.bin>


More information about the llvm-commits mailing list