[PATCH] D105407: [LangRef] Add elementtype attribute

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 09:04:40 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1fd23a065bf7: [LangRef] Add elementtype attribute (authored by nikic).

Repository:
  rG LLVM Github Monorepo

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
@@ -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(<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.359004.patch
Type: text/x-patch
Size: 1113 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210715/a6029065/attachment.bin>


More information about the llvm-commits mailing list