From: Richard Trieu Date: Fri, 21 Jul 2017 04:56:48 +0000 (+0000) Subject: Fix tblgen error. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=217d16e0395debf71e13e6623b4b3b0bb9a83e8f;p=clang Fix tblgen error. tblgen couldn't determing a unique name between "long_call" and "far", so it errored out when generating documentation. Copy the documentation, and give an explicit header for "long_call". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308714 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index 21f6abeb11..5fd6b55e43 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -1191,13 +1191,13 @@ def MicroMips : InheritableAttr, TargetSpecificAttr { def MipsLongCall : InheritableAttr, TargetSpecificAttr { let Spellings = [GCC<"long_call">, GCC<"far">]; let Subjects = SubjectList<[Function]>; - let Documentation = [MipsCallStyleDocs]; + let Documentation = [MipsLongCallStyleDocs]; } def MipsShortCall : InheritableAttr, TargetSpecificAttr { let Spellings = [GCC<"near">]; let Subjects = SubjectList<[Function]>; - let Documentation = [MipsCallStyleDocs]; + let Documentation = [MipsShortCallStyleDocs]; } def Mode : Attr { diff --git a/include/clang/Basic/AttrDocs.td b/include/clang/Basic/AttrDocs.td index f88366f2fa..5c05f2cccb 100644 --- a/include/clang/Basic/AttrDocs.td +++ b/include/clang/Basic/AttrDocs.td @@ -1323,7 +1323,28 @@ on the command line. }]; } -def MipsCallStyleDocs : Documentation { +def MipsLongCallStyleDocs : Documentation { + let Category = DocCatFunction; + let Heading = "long_call (gnu::long_call, gnu::far)"; + let Content = [{ +Clang supports the ``__attribute__((long_call))``, ``__attribute__((far))``, +and ``__attribute__((near))`` attributes on MIPS targets. These attributes may +only be added to function declarations and change the code generated +by the compiler when directly calling the function. The ``near`` attribute +allows calls to the function to be made using the ``jal`` instruction, which +requires the function to be located in the same naturally aligned 256MB +segment as the caller. The ``long_call`` and ``far`` attributes are synonyms +and require the use of a different call sequence that works regardless +of the distance between the functions. + +These attributes have no effect for position-independent code. + +These attributes take priority over command line switches such +as ``-mlong-calls`` and ``-mno-long-calls``. + }]; +} + +def MipsShortCallStyleDocs : Documentation { let Category = DocCatFunction; let Content = [{ Clang supports the ``__attribute__((long_call))``, ``__attribute__((far))``,