[llvm] 0f64945 - [DOC] Refactor Functions section in LangRef
Valery N Dmitriev via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 14:34:47 PDT 2022
Author: Sebastian Peryt
Date: 2022-05-26T14:34:34-07:00
New Revision: 0f64945352f7df4eb2c884c34a822952b6b69bff
URL: https://github.com/llvm/llvm-project/commit/0f64945352f7df4eb2c884c34a822952b6b69bff
DIFF: https://github.com/llvm/llvm-project/commit/0f64945352f7df4eb2c884c34a822952b6b69bff.diff
LOG: [DOC] Refactor Functions section in LangRef
This change is a small refactor of Functions section
to update placement of define syntax.
Reviewed By: RKSimon
Differential revision: https://reviews.llvm.org/D125831
Added:
Modified:
llvm/docs/LangRef.rst
Removed:
################################################################################
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 46549e1175ae6..8d5a5f0e31633 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -782,14 +782,31 @@ an optional ``unnamed_addr`` attribute, a return type, an optional
:ref:`parameter attribute <paramattrs>` for the return type, a function
name, a (possibly empty) argument list (each with optional :ref:`parameter
attributes <paramattrs>`), optional :ref:`function attributes <fnattrs>`,
-an optional address space, an optional section, an optional alignment,
-an optional :ref:`comdat <langref_comdats>`,
+an optional address space, an optional section, an optional partition,
+an optional alignment, an optional :ref:`comdat <langref_comdats>`,
an optional :ref:`garbage collector name <gc>`, an optional :ref:`prefix <prefixdata>`,
an optional :ref:`prologue <prologuedata>`,
an optional :ref:`personality <personalityfn>`,
an optional list of attached :ref:`metadata <metadata>`,
an opening curly brace, a list of basic blocks, and a closing curly brace.
+Syntax::
+
+ define [linkage] [PreemptionSpecifier] [visibility] [DLLStorageClass]
+ [cconv] [ret attrs]
+ <ResultType> @<FunctionName> ([argument list])
+ [(unnamed_addr|local_unnamed_addr)] [AddrSpace] [fn Attrs]
+ [section "name"] [partition "name"] [comdat [($name)]] [align N]
+ [gc] [prefix Constant] [prologue Constant] [personality Constant]
+ (!name !N)* { ... }
+
+The argument list is a comma separated sequence of arguments where each
+argument is of the following form:
+
+Syntax::
+
+ <type> [parameter Attrs] [name]
+
LLVM function declarations consist of the "``declare``" keyword, an
optional :ref:`linkage type <linkage>`, an optional :ref:`visibility style
<visibility>`, an optional :ref:`DLL storage class <dllstorageclass>`, an
@@ -837,24 +854,6 @@ not be significant within the module.
If an explicit address space is not given, it will default to the program
address space from the :ref:`datalayout string<langref_datalayout>`.
-Syntax::
-
- define [linkage] [PreemptionSpecifier] [visibility] [DLLStorageClass]
- [cconv] [ret attrs]
- <ResultType> @<FunctionName> ([argument list])
- [(unnamed_addr|local_unnamed_addr)] [AddrSpace] [fn Attrs]
- [section "name"] [partition "name"] [comdat [($name)]] [align N]
- [gc] [prefix Constant] [prologue Constant] [personality Constant]
- (!name !N)* { ... }
-
-The argument list is a comma separated sequence of arguments where each
-argument is of the following form:
-
-Syntax::
-
- <type> [parameter Attrs] [name]
-
-
.. _langref_aliases:
Aliases
More information about the llvm-commits
mailing list