diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index 0207ebb084ad..b37a7e395675 100644 --- a/clang/include/clang/Basic/AttrDocs.td +++ b/clang/include/clang/Basic/AttrDocs.td @@ -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 }]; }