Skip to content

Commit 93b0173

Browse files
[llvm] Proofread ProgrammersManual.rst (llvm#161779)
1 parent 8af44b0 commit 93b0173

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

llvm/docs/ProgrammersManual.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ recovery.
463463
situations where you absolutely must emit a non-programmatic error and
464464
the ``Error`` model isn't workable you can call ``reportFatalUsageError``,
465465
which will call installed error handlers, print a message, and exit the
466-
program. The use of `reportFatalUsageError` in this case is discouraged.
466+
program. The use of ``reportFatalUsageError`` in this case is discouraged.
467467

468468
Recoverable errors are modeled using LLVM's ``Error`` scheme. This scheme
469469
represents errors using function return values, similar to classic C integer
@@ -579,7 +579,7 @@ This second form is often more readable for functions that involve multiple
579579

580580
If an ``Expected<T>`` value will be moved into an existing variable then the
581581
``moveInto()`` method avoids the need to name an extra variable. This is
582-
useful to enable ``operator->()`` the ``Expected<T>`` value has pointer-like
582+
useful to enable ``operator->()`` if the ``Expected<T>`` value has pointer-like
583583
semantics. For example:
584584

585585
.. code-block:: c++
@@ -957,7 +957,7 @@ Concatenating Errors with joinErrors
957957
""""""""""""""""""""""""""""""""""""
958958

959959
In the archive walking example above, ``BadFileFormat`` errors are simply
960-
consumed and ignored. If the client had wanted report these errors after
960+
consumed and ignored. If the client had wanted to report these errors after
961961
completing the walk over the archive they could use the ``joinErrors`` utility:
962962

963963
.. code-block:: c++
@@ -989,7 +989,7 @@ Building fallible iterators and iterator ranges
989989
"""""""""""""""""""""""""""""""""""""""""""""""
990990

991991
The archive walking examples above retrieve archive members by index; however,
992-
this requires considerable boiler-plate for iteration and error checking. We can
992+
this requires considerable boilerplate for iteration and error checking. We can
993993
clean this up by using the "fallible iterator" pattern, which supports the
994994
following natural iteration idiom for fallible containers like Archive:
995995

@@ -1039,7 +1039,7 @@ fallible_iterator utility which provides ``operator++`` and ``operator--``,
10391039
returning any errors via a reference passed in to the wrapper at construction
10401040
time. The fallible_iterator wrapper takes care of (a) jumping to the end of the
10411041
range on error, and (b) marking the error as checked whenever an iterator is
1042-
compared to ``end`` and found to be inequal (in particular, this marks the
1042+
compared to ``end`` and found to be unequal (in particular, this marks the
10431043
error as checked throughout the body of a range-based for loop), enabling early
10441044
exit from the loop without redundant error checking.
10451045

@@ -1452,15 +1452,15 @@ A more general utility is provided in `llvm/tools/reduce-chunk-list/reduce-chunk
14521452
How to use reduce-chunk-list:
14531453
First, Figure out the number of calls to the debug counter you want to minimize.
14541454
To do so, run the compilation command causing you want to minimize with `-print-debug-counter` adding a `-mllvm` if needed.
1455-
Than find the line with the counter of interest. it should look like:
1455+
Then find the line with the counter of interest. it should look like:
14561456

14571457
.. code-block:: none
14581458
14591459
my-counter : {5678,empty}
14601460
14611461
The number of calls to `my-counter` is 5678
14621462

1463-
Than Find the minimum set of chunks that is interesting, with `reduce-chunk-list`.
1463+
Then find the minimum set of chunks that is interesting, with `reduce-chunk-list`.
14641464
Build a reproducer script like:
14651465

14661466
.. code-block:: bash
@@ -1469,7 +1469,7 @@ Build a reproducer script like:
14691469
opt -debug-counter=my-counter=$1
14701470
# ... Test result of the command. Failure of the script is considered interesting
14711471
1472-
Than run `reduce-chunk-list my-script.sh 0-5678 2>&1 | tee dump_bisect`
1472+
Then run `reduce-chunk-list my-script.sh 0-5678 2>&1 | tee dump_bisect`
14731473
This command may take some time.
14741474
but when it is done, it will print the result like: `Minimal Chunks = 0:1:5:11-12:33-34`
14751475

@@ -1528,7 +1528,7 @@ LLVM has a plethora of data structures in the ``llvm/ADT/`` directory, and we
15281528
commonly use STL data structures. This section describes the trade-offs you
15291529
should consider when you pick one.
15301530

1531-
The first step is a choose your own adventure: do you want a sequential
1531+
The first step is to choose your own adventure: do you want a sequential
15321532
container, a set-like container, or a map-like container? The most important
15331533
thing when choosing a container is the algorithmic properties of how you plan to
15341534
access the container. Based on that, you should use:

0 commit comments

Comments
 (0)