Skip to content
Snippets Groups Projects
Commit 2cee159a authored by Aaron Ballman's avatar Aaron Ballman
Browse files

Create a documentation category for the new calling convention documentation....

Create a documentation category for the new calling convention documentation. Drive-by fixing of duplicate target names from a previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220419 91177308-0d34-0410-b5e6-96231b3b80d8
parent 9c8ca0e0
No related branches found
No related tags found
No related merge requests found
......@@ -673,8 +673,17 @@ The semantics are as follows:
}];
}
def DocCatCallingConvs : DocumentationCategory<"Calling Conventions"> {
let Content = [{
Clang supports several different calling conventions, depending on the target
platform and architecture. The calling convention used for a function determines
how parameters are passed, how results are returned to the caller, and other
low-level details of calling a function.
}];
}
def PcsDocs : Documentation {
let Category = DocCatFunction;
let Category = DocCatCallingConvs;
let Content = [{
On ARM targets, this attribute can be used to select calling conventions
similar to ``stdcall`` on x86. Valid parameter values are "aapcs" and
......@@ -683,7 +692,7 @@ similar to ``stdcall`` on x86. Valid parameter values are "aapcs" and
}
def RegparmDocs : Documentation {
let Category = DocCatFunction;
let Category = DocCatCallingConvs;
let Content = [{
On 32-bit x86 targets, the regparm attribute causes the compiler to pass
the first three integer parameters in EAX, EDX, and ECX instead of on the
......@@ -693,7 +702,7 @@ are passed via the stack as normal.
}
def SysVABIDocs : Documentation {
let Category = DocCatFunction;
let Category = DocCatCallingConvs;
let Content = [{
On Windows x86_64 targets, this attribute changes the calling convention of a
function to match the default convention used on Sys V targets such as Linux,
......@@ -702,7 +711,7 @@ Mac, and BSD. This attribute has no effect on other targets.
}
def MSABIDocs : Documentation {
let Category = DocCatFunction;
let Category = DocCatCallingConvs;
let Content = [{
On non-Windows x86_64 targets, this attribute changes the calling convention of
a function to match the default convention used on Windows x86_64. This
......@@ -711,21 +720,21 @@ attribute has no effect on Windows targets or non-x86_64 targets.
}
def StdCallDocs : Documentation {
let Category = DocCatFunction;
let Category = DocCatCallingConvs;
let Content = [{
On 32-bit x86 targets, this attribute changes the calling convention of a
function to clear parameters off of the stack on return. This convention does
not support variadic calls or unprototyped functions in C, and has no effect on
x86_64 targets. This calling convention is used widely by the Windows API and
COM applications. Documentation for the Visual C++ attribute is available on
MSDN_.
MSDN1_.
.. _MSDN: http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx
.. _MSDN1: http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx
}];
}
def FastCallDocs : Documentation {
let Category = DocCatFunction;
let Category = DocCatCallingConvs;
let Content = [{
On 32-bit x86 targets, this attribute changes the calling convention of a
function to use ECX and EDX as register parameters and clear parameters off of
......@@ -734,23 +743,23 @@ unprototyped functions in C, and has no effect on x86_64 targets. This calling
convention is supported primarily for compatibility with existing code. Users
seeking register parameters should use the ``regparm`` attribute, which does
not require callee-cleanup. Documentation for the Visual C++ attribute is
available on MSDN_.
available on MSDN2_.
.. _MSDN: http://msdn.microsoft.com/en-us/library/6xa169sk.aspx
.. _MSDN2: http://msdn.microsoft.com/en-us/library/6xa169sk.aspx
}];
}
def ThisCallDocs : Documentation {
let Category = DocCatFunction;
let Category = DocCatCallingConvs;
let Content = [{
On 32-bit x86 targets, this attribute changes the calling convention of a
function to use ECX for the first parameter (typically the implicit ``this``
parameter of C++ methods) and clear parameters off of the stack on return. This
convention does not support variadic calls or unprototyped functions in C, and
has no effect on x86_64 targets. Documentation for the Visual C++ attribute is
available on MSDN_.
available on MSDN3_.
.. _MSDN: http://msdn.microsoft.com/en-us/library/ek8tkfbw.aspx
.. _MSDN3: http://msdn.microsoft.com/en-us/library/ek8tkfbw.aspx
}];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment