Index: llvm/docs/LangRef.rst =================================================================== --- llvm/docs/LangRef.rst +++ llvm/docs/LangRef.rst @@ -782,14 +782,31 @@ :ref:`parameter attribute ` for the return type, a function name, a (possibly empty) argument list (each with optional :ref:`parameter attributes `), optional :ref:`function attributes `, -an optional address space, an optional section, an optional alignment, -an optional :ref:`comdat `, +an optional address space, an optional section, an optional partition, +an optional alignment, an optional :ref:`comdat `, an optional :ref:`garbage collector name `, an optional :ref:`prefix `, an optional :ref:`prologue `, an optional :ref:`personality `, an optional list of attached :ref:`metadata `, an opening curly brace, a list of basic blocks, and a closing curly brace. +Syntax:: + + define [linkage] [PreemptionSpecifier] [visibility] [DLLStorageClass] + [cconv] [ret attrs] + @ ([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:: + + [parameter Attrs] [name] + LLVM function declarations consist of the "``declare``" keyword, an optional :ref:`linkage type `, an optional :ref:`visibility style `, an optional :ref:`DLL storage class `, an @@ -837,24 +854,6 @@ If an explicit address space is not given, it will default to the program address space from the :ref:`datalayout string`. -Syntax:: - - define [linkage] [PreemptionSpecifier] [visibility] [DLLStorageClass] - [cconv] [ret attrs] - @ ([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:: - - [parameter Attrs] [name] - - .. _langref_aliases: Aliases