]> granicus.if.org Git - clang/commitdiff
Fix tblgen error.
authorRichard Trieu <rtrieu@google.com>
Fri, 21 Jul 2017 04:56:48 +0000 (04:56 +0000)
committerRichard Trieu <rtrieu@google.com>
Fri, 21 Jul 2017 04:56:48 +0000 (04:56 +0000)
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

include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td

index 21f6abeb11ca79ebd5e55fc2ed48126d167c6421..5fd6b55e43927d4d656462081f17a76d3edbee8a 100644 (file)
@@ -1191,13 +1191,13 @@ def MicroMips : InheritableAttr, TargetSpecificAttr<TargetMips> {
 def MipsLongCall : InheritableAttr, TargetSpecificAttr<TargetMips> {
   let Spellings = [GCC<"long_call">, GCC<"far">];
   let Subjects = SubjectList<[Function]>;
-  let Documentation = [MipsCallStyleDocs];
+  let Documentation = [MipsLongCallStyleDocs];
 }
 
 def MipsShortCall : InheritableAttr, TargetSpecificAttr<TargetMips> {
   let Spellings = [GCC<"near">];
   let Subjects = SubjectList<[Function]>;
-  let Documentation = [MipsCallStyleDocs];
+  let Documentation = [MipsShortCallStyleDocs];
 }
 
 def Mode : Attr {
index f88366f2fa69bb0b495220f4f4754208e6170863..5c05f2cccb0ab1f662666136b2cf4ec2d66d1edc 100644 (file)
@@ -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))``,