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

llvm-svn: 220419
This commit is contained in:
Aaron Ballman 2014-10-22 20:33:24 +00:00
parent 43dcf2172a
commit eab478c7a8
1 changed files with 22 additions and 13 deletions

View File

@ -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 { def PcsDocs : Documentation {
let Category = DocCatFunction; let Category = DocCatCallingConvs;
let Content = [{ let Content = [{
On ARM targets, this attribute can be used to select calling conventions On ARM targets, this attribute can be used to select calling conventions
similar to ``stdcall`` on x86. Valid parameter values are "aapcs" and 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 { def RegparmDocs : Documentation {
let Category = DocCatFunction; let Category = DocCatCallingConvs;
let Content = [{ let Content = [{
On 32-bit x86 targets, the regparm attribute causes the compiler to pass 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 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 { def SysVABIDocs : Documentation {
let Category = DocCatFunction; let Category = DocCatCallingConvs;
let Content = [{ let Content = [{
On Windows x86_64 targets, this attribute changes the calling convention of a 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, 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 { def MSABIDocs : Documentation {
let Category = DocCatFunction; let Category = DocCatCallingConvs;
let Content = [{ let Content = [{
On non-Windows x86_64 targets, this attribute changes the calling convention of 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 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 { def StdCallDocs : Documentation {
let Category = DocCatFunction; let Category = DocCatCallingConvs;
let Content = [{ let Content = [{
On 32-bit x86 targets, this attribute changes the calling convention of a 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 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 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 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 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 { def FastCallDocs : Documentation {
let Category = DocCatFunction; let Category = DocCatCallingConvs;
let Content = [{ let Content = [{
On 32-bit x86 targets, this attribute changes the calling convention of a 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 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 convention is supported primarily for compatibility with existing code. Users
seeking register parameters should use the ``regparm`` attribute, which does seeking register parameters should use the ``regparm`` attribute, which does
not require callee-cleanup. Documentation for the Visual C++ attribute is 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 { def ThisCallDocs : Documentation {
let Category = DocCatFunction; let Category = DocCatCallingConvs;
let Content = [{ let Content = [{
On 32-bit x86 targets, this attribute changes the calling convention of a 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`` 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 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 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 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
}]; }];
} }