Skip to content

Commit 124f259

Browse files
committed
[docs] Fixing Sphinx warnings to unclog the buildbot
Lots of blocks had "llvm" or "nasm" syntax types but either weren't following the syntax, or the syntax has changed (and sphinx hasn't keep up) or the type doesn't even exist (nasm?). Other documents had :options: what were invalid. I only removed those that had warnings, and left the ones that didn't, in order to follow the principle of least surprise. This is like this for ages, but the buildbot is now failing on errors. It may take a while to upgrade the buildbot's sphinx, if that's even possible, but that shouldn't stop us from getting docs updates (which seem down for quite a while). Also, we're not losing any syntax highlight, since when it doesn't parse, it doesn't colour. Ie. those blocks are not being highlighted anyway. I'm trying to get all docs in one go, so that it's easy to revert later if we do fix, or at least easy to know what's to fix. llvm-svn: 276109
1 parent 5b7a79f commit 124f259

22 files changed

+182
-184
lines changed

llvm/docs/CodeGenerator.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ For example, consider this simple LLVM example:
436436
The X86 instruction selector might produce this machine code for the ``div`` and
437437
``ret``:
438438

439-
.. code-block:: llvm
439+
.. code-block:: text
440440
441441
;; Start of div
442442
%EAX = mov %reg1024 ;; Copy X (in reg1024) into EAX
@@ -453,7 +453,7 @@ By the end of code generation, the register allocator would coalesce the
453453
registers and delete the resultant identity moves producing the following
454454
code:
455455

456-
.. code-block:: llvm
456+
.. code-block:: text
457457
458458
;; X is in EAX, Y is in ECX
459459
mov %EAX, %EDX
@@ -965,7 +965,7 @@ target code. For example, consider the following LLVM fragment:
965965
966966
This LLVM code corresponds to a SelectionDAG that looks basically like this:
967967

968-
.. code-block:: llvm
968+
.. code-block:: text
969969
970970
(fadd:f32 (fmul:f32 (fadd:f32 W, X), Y), Z)
971971

llvm/docs/CommandGuide/FileCheck.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ exists anywhere in the file.
144144
The FileCheck -check-prefix option
145145
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146146

147-
The FileCheck :option:`-check-prefix` option allows multiple test
147+
The FileCheck `-check-prefix` option allows multiple test
148148
configurations to be driven from one `.ll` file. This is useful in many
149149
circumstances, for example, testing different architectural variants with
150150
:program:`llc`. Here's a simple example:
@@ -303,7 +303,7 @@ be aware that the definition rule can match `after` its use.
303303

304304
So, for instance, the code below will pass:
305305

306-
.. code-block:: llvm
306+
.. code-block:: text
307307
308308
; CHECK-DAG: vmov.32 [[REG2:d[0-9]+]][0]
309309
; CHECK-DAG: vmov.32 [[REG2]][1]
@@ -312,7 +312,7 @@ So, for instance, the code below will pass:
312312
313313
While this other code, will not:
314314

315-
.. code-block:: llvm
315+
.. code-block:: text
316316
317317
; CHECK-DAG: vmov.32 [[REG2:d[0-9]+]][0]
318318
; CHECK-DAG: vmov.32 [[REG2]][1]
@@ -473,7 +473,7 @@ To match newline characters in regular expressions the character class
473473

474474
matches output of the form (from llvm-dwarfdump):
475475

476-
.. code-block:: llvm
476+
.. code-block:: text
477477
478478
DW_AT_location [DW_FORM_sec_offset] (0x00000233)
479479
DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000c9] = "intd")

llvm/docs/CommandGuide/llvm-nm.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ OPTIONS
6868

6969
.. option:: -B (default)
7070

71-
Use BSD output format. Alias for :option:`--format=bsd`.
71+
Use BSD output format. Alias for `--format=bsd`.
7272

7373
.. option:: -P
7474

75-
Use POSIX.2 output format. Alias for :option:`--format=posix`.
75+
Use POSIX.2 output format. Alias for `--format=posix`.
7676

7777
.. option:: --debug-syms, -a
7878

llvm/docs/CommandGuide/opt.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ DESCRIPTION
1212
The :program:`opt` command is the modular LLVM optimizer and analyzer. It
1313
takes LLVM source files as input, runs the specified optimizations or analyses
1414
on it, and then outputs the optimized file or the analysis results. The
15-
function of :program:`opt` depends on whether the :option:`-analyze` option is
15+
function of :program:`opt` depends on whether the `-analyze` option is
1616
given.
1717

18-
When :option:`-analyze` is specified, :program:`opt` performs various analyses
18+
When `-analyze` is specified, :program:`opt` performs various analyses
1919
of the input source. It will usually print the results on standard output, but
2020
in a few cases, it will print output to standard error or generate a file with
2121
the analysis output, which is usually done when the output is meant for another
2222
program.
2323

24-
While :option:`-analyze` is *not* given, :program:`opt` attempts to produce an
24+
While `-analyze` is *not* given, :program:`opt` attempts to produce an
2525
optimized output file. The optimizations available via :program:`opt` depend
2626
upon what libraries were linked into it as well as any additional libraries
2727
that have been loaded with the :option:`-load` option. Use the :option:`-help`
@@ -68,19 +68,19 @@ OPTIONS
6868

6969
.. option:: -disable-opt
7070

71-
This option is only meaningful when :option:`-std-link-opts` is given. It
71+
This option is only meaningful when `-std-link-opts` is given. It
7272
disables most passes.
7373

7474
.. option:: -strip-debug
7575

7676
This option causes opt to strip debug information from the module before
77-
applying other optimizations. It is essentially the same as :option:`-strip`
77+
applying other optimizations. It is essentially the same as `-strip`
7878
but it ensures that stripping of debug information is done first.
7979

8080
.. option:: -verify-each
8181

8282
This option causes opt to add a verify pass after every pass otherwise
83-
specified on the command line (including :option:`-verify`). This is useful
83+
specified on the command line (including `-verify`). This is useful
8484
for cases where it is suspected that a pass is creating an invalid module but
8585
it is not clear which pass is doing it.
8686

llvm/docs/ExceptionHandling.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ outlined. After the handler is outlined, this intrinsic is simply removed.
406406
``llvm.eh.exceptionpointer``
407407
----------------------------
408408

409-
.. code-block:: llvm
409+
.. code-block:: text
410410
411411
i8 addrspace(N)* @llvm.eh.padparam.pNi8(token %catchpad)
412412
@@ -427,7 +427,7 @@ backend. Uses of them are generated by the backend's
427427
``llvm.eh.sjlj.setjmp``
428428
~~~~~~~~~~~~~~~~~~~~~~~
429429

430-
.. code-block:: llvm
430+
.. code-block:: text
431431
432432
i32 @llvm.eh.sjlj.setjmp(i8* %setjmp_buf)
433433
@@ -664,7 +664,7 @@ all of the new IR instructions:
664664
return 0;
665665
}
666666
667-
.. code-block:: llvm
667+
.. code-block:: text
668668
669669
define i32 @f() nounwind personality i32 (...)* @__CxxFrameHandler3 {
670670
entry:
@@ -741,7 +741,7 @@ C++ code:
741741
}
742742
}
743743
744-
.. code-block:: llvm
744+
.. code-block:: text
745745
746746
define void @f() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
747747
entry:

llvm/docs/Extensions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The following additional relocation types are supported:
4343
corresponds to the COFF relocation types ``IMAGE_REL_I386_DIR32NB`` (32-bit) or
4444
``IMAGE_REL_AMD64_ADDR32NB`` (64-bit).
4545

46-
.. code-block:: gas
46+
.. code-block:: text
4747
4848
.text
4949
fun:

llvm/docs/GarbageCollection.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ IR features is specified by the selected :ref:`GC strategy description
204204
Specifying GC code generation: ``gc "..."``
205205
-------------------------------------------
206206

207-
.. code-block:: llvm
207+
.. code-block:: text
208208
209209
define <returntype> @name(...) gc "name" { ... }
210210

llvm/docs/GetElementPtr.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ memory, or a global variable.
105105

106106
To make this clear, let's consider a more obtuse example:
107107

108-
.. code-block:: llvm
108+
.. code-block:: text
109109
110110
%MyVar = uninitialized global i32
111111
...
@@ -142,7 +142,7 @@ Quick answer: there are no superfluous indices.
142142
This question arises most often when the GEP instruction is applied to a global
143143
variable which is always a pointer type. For example, consider this:
144144

145-
.. code-block:: llvm
145+
.. code-block:: text
146146
147147
%MyStruct = uninitialized global { float*, i32 }
148148
...
@@ -178,7 +178,7 @@ The GetElementPtr instruction dereferences nothing. That is, it doesn't access
178178
memory in any way. That's what the Load and Store instructions are for. GEP is
179179
only involved in the computation of addresses. For example, consider this:
180180

181-
.. code-block:: llvm
181+
.. code-block:: text
182182
183183
%MyVar = uninitialized global { [40 x i32 ]* }
184184
...
@@ -195,7 +195,7 @@ illegal.
195195
In order to access the 18th integer in the array, you would need to do the
196196
following:
197197

198-
.. code-block:: llvm
198+
.. code-block:: text
199199
200200
%idx = getelementptr { [40 x i32]* }, { [40 x i32]* }* %, i64 0, i32 0
201201
%arr = load [40 x i32]** %idx
@@ -204,7 +204,7 @@ following:
204204
In this case, we have to load the pointer in the structure with a load
205205
instruction before we can index into the array. If the example was changed to:
206206

207-
.. code-block:: llvm
207+
.. code-block:: text
208208
209209
%MyVar = uninitialized global { [40 x i32 ] }
210210
...

llvm/docs/HowToUseInstrMappings.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ instructions with each other. These tables are emitted in the
3030
``XXXInstrInfo.inc`` file along with the functions to query them. Following
3131
is the definition of ``InstrMapping`` class definied in Target.td file:
3232

33-
.. code-block:: llvm
33+
.. code-block:: text
3434
3535
class InstrMapping {
3636
// Used to reduce search space only to the instructions using this
@@ -69,7 +69,7 @@ non-predicated form by assigning appropriate values to the ``InstrMapping``
6969
fields. For this relationship, non-predicated instructions are treated as key
7070
instruction since they are the one used to query the interface function.
7171

72-
.. code-block:: llvm
72+
.. code-block:: text
7373
7474
def getPredOpcode : InstrMapping {
7575
// Choose a FilterClass that is used as a base class for all the
@@ -116,7 +116,7 @@ to include relevant information in its definition. For example, consider
116116
following to be the current definitions of ADD, ADD_pt (true) and ADD_pf (false)
117117
instructions:
118118

119-
.. code-block:: llvm
119+
.. code-block:: text
120120
121121
def ADD : ALU32_rr<(outs IntRegs:$dst), (ins IntRegs:$a, IntRegs:$b),
122122
"$dst = add($a, $b)",
@@ -137,7 +137,7 @@ In this step, we modify these instructions to include the information
137137
required by the relationship model, <tt>getPredOpcode</tt>, so that they can
138138
be related.
139139

140-
.. code-block:: llvm
140+
.. code-block:: text
141141
142142
def ADD : PredRel, ALU32_rr<(outs IntRegs:$dst), (ins IntRegs:$a, IntRegs:$b),
143143
"$dst = add($a, $b)",

llvm/docs/InAlloca.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ that passes two default-constructed ``Foo`` objects to ``g`` in the
4141
g(Foo(), Foo());
4242
}
4343

44-
.. code-block:: llvm
44+
.. code-block:: text
4545
4646
%struct.Foo = type { i32, i32 }
4747
declare void @Foo_ctor(%struct.Foo* %this)

0 commit comments

Comments
 (0)