[llvm] 178619d - [Clang] Fill in documentation gaps for some attributes (#68967)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 07:09:10 PDT 2023


Author: Stephen Tozer
Date: 2023-10-18T15:09:05+01:00
New Revision: 178619d71dcfd23363859e417c792d8170d5f9f8

URL: https://github.com/llvm/llvm-project/commit/178619d71dcfd23363859e417c792d8170d5f9f8
DIFF: https://github.com/llvm/llvm-project/commit/178619d71dcfd23363859e417c792d8170d5f9f8.diff

LOG: [Clang] Fill in documentation gaps for some attributes (#68967)

This patch adds some missing documentation for some attributes in
BitCodeFormat, where the integer code mappings for attributes after code
79 were not listed, and in LangRef where the incompatibility between
minsize/optsize and optnone was not mentioned.

Added: 
    

Modified: 
    llvm/docs/BitCodeFormat.rst
    llvm/docs/LangRef.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/BitCodeFormat.rst b/llvm/docs/BitCodeFormat.rst
index 70be73abef19d6d..db913f59d691d71 100644
--- a/llvm/docs/BitCodeFormat.rst
+++ b/llvm/docs/BitCodeFormat.rst
@@ -1085,6 +1085,14 @@ The integer codes are mapped to well-known attributes as follows.
 * code 77: ``elementtype``
 * code 78: ``disable_sanitizer_instrumentation``
 * code 79: ``nosanitize_bounds``
+* code 80: ``allocalign``
+* code 81: ``allocptr``
+* code 82: ``allockind``
+* code 83: ``presplitcoroutine``
+* code 84: ``fn_ret_thunk_extern``
+* code 85: ``skipprofile``
+* code 86: ``memory``
+* code 87: ``nofpclass``
 
 .. note::
   The ``allocsize`` attribute has a special encoding for its arguments. Its two

diff  --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 2035091be5a6840..798b0ab6c593ab4 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1872,6 +1872,7 @@ example:
     passes make choices that keep the code size of this function as small
     as possible and perform optimizations that may sacrifice runtime
     performance in order to minimize the size of the generated code.
+    This attribute is incompatible with the ``optnone`` attribute.
 ``naked``
     This attribute disables prologue / epilogue emission for the
     function. This can have very system-specific consequences.
@@ -2044,6 +2045,7 @@ example:
     passes make choices that keep the code size of this function low,
     and otherwise do optimizations specifically to reduce code size as
     long as they do not significantly impact runtime performance.
+    This attribute is incompatible with the ``optnone`` attribute.
 ``"patchable-function"``
     This attribute tells the code generator that the code
     generated for this function needs to follow certain conventions that


        


More information about the llvm-commits mailing list