aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/ProgrammersManual.rst
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs/ProgrammersManual.rst')
-rw-r--r--llvm/docs/ProgrammersManual.rst26
1 files changed, 13 insertions, 13 deletions
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst
index d99b584..7b7a1ce 100644
--- a/llvm/docs/ProgrammersManual.rst
+++ b/llvm/docs/ProgrammersManual.rst
@@ -1043,7 +1043,7 @@ compared to ``end`` and found to be unequal (in particular, this marks the
error as checked throughout the body of a range-based for loop), enabling early
exit from the loop without redundant error checking.
-Instances of the fallible iterator interface (e.g. FallibleChildIterator above)
+Instances of the fallible iterator interface (e.g., FallibleChildIterator above)
are wrapped using the ``make_fallible_itr`` and ``make_fallible_end``
functions. E.g.:
@@ -1640,7 +1640,7 @@ dynamically smaller than N, no malloc is performed. This can be a big win in
cases where the malloc/free call is far more expensive than the code that
fiddles around with the elements.
-This is good for vectors that are "usually small" (e.g. the number of
+This is good for vectors that are "usually small" (e.g., the number of
predecessors/successors of a block is usually less than 8). On the other hand,
this makes the size of the ``SmallVector`` itself large, so you don't want to
allocate lots of them (doing so will waste a lot of space). As such,
@@ -1684,7 +1684,7 @@ to keep ``sizeof(SmallVector<T>)`` around 64 bytes).
.. code-block:: c++
- // DISCOURAGED: Clients cannot pass e.g. raw arrays.
+ // DISCOURAGED: Clients cannot pass e.g., raw arrays.
hardcodedContiguousStorage(const SmallVectorImpl<Foo> &In);
// ENCOURAGED: Clients can pass any contiguous storage of Foo.
allowsAnyContiguousStorage(ArrayRef<Foo> In);
@@ -1695,7 +1695,7 @@ to keep ``sizeof(SmallVector<T>)`` around 64 bytes).
allowsAnyContiguousStorage(Vec); // Works.
}
- // DISCOURAGED: Clients cannot pass e.g. SmallVector<Foo, 8>.
+ // DISCOURAGED: Clients cannot pass e.g., SmallVector<Foo, 8>.
hardcodedSmallSize(SmallVector<Foo, 2> &Out);
// ENCOURAGED: Clients can pass any SmallVector<Foo, N>.
allowsAnySmallSize(SmallVectorImpl<Foo> &Out);
@@ -2064,7 +2064,7 @@ so it can be embedded into heap data structures and returned by-value. On the
other hand, ``std::string`` is highly inefficient for inline editing (e.g.
concatenating a bunch of stuff together) and because it is provided by the
standard library, its performance characteristics depend a lot of the host
-standard library (e.g. libc++ and MSVC provide a highly optimized string class,
+standard library (e.g., libc++ and MSVC provide a highly optimized string class,
GCC contains a really slow implementation).
The major disadvantage of ``std::string`` is that almost every operation that makes
@@ -2198,7 +2198,7 @@ physical registers, virtual registers, or numbered basic blocks.
``SparseMultiSet`` is useful for algorithms that need very fast
clear/find/insert/erase of the entire collection, and iteration over sets of
elements sharing a key. It is often a more efficient choice than using composite
-data structures (e.g. vector-of-vectors, map-of-vectors). It is not intended for
+data structures (e.g., vector-of-vectors, map-of-vectors). It is not intended for
building composite data structures.
.. _dss_FoldingSet:
@@ -2268,7 +2268,7 @@ iteration.
The difference between ``SetVector`` and other sets is that the order of iteration
is guaranteed to match the order of insertion into the ``SetVector``. This property
is really important for things like sets of pointers. Because pointer values
-are non-deterministic (e.g. vary across runs of the program on different
+are non-deterministic (e.g., vary across runs of the program on different
machines), iterating over the pointers in the set will not be in a well-defined
order.
@@ -2473,7 +2473,7 @@ pair in the map, etc.
``std::map`` is most useful when your keys or values are very large, if you need to
iterate over the collection in sorted order, or if you need stable iterators
-into the map (i.e. they don't get invalidated if an insertion or deletion of
+into the map (i.e., they don't get invalidated if an insertion or deletion of
another element takes place).
.. _dss_mapvector:
@@ -2542,7 +2542,7 @@ There are several bit storage containers, and choosing when to use each is
relatively straightforward.
One additional option is ``std::vector<bool>``: we discourage its use for two
-reasons 1) the implementation in many common compilers (e.g. commonly
+reasons 1) the implementation in many common compilers (e.g., commonly
available versions of GCC) is extremely inefficient and 2) the C++ standards
committee is likely to deprecate this container and/or change it significantly
somehow. In any case, please don't use it.
@@ -2557,7 +2557,7 @@ It supports individual bit setting/testing, as well as set operations. The set
operations take time O(size of bitvector), but operations are performed one word
at a time, instead of one bit at a time. This makes the ``BitVector`` very fast for
set operations compared to other containers. Use the ``BitVector`` when you expect
-the number of set bits to be high (i.e. a dense set).
+the number of set bits to be high (i.e., a dense set).
.. _dss_smallbitvector:
@@ -3305,7 +3305,7 @@ naming value definitions. The symbol table can provide a name for any Value_.
Note that the ``SymbolTable`` class should not be directly accessed by most
clients. It should only be used when iteration over the symbol table names
themselves are required, which is very special purpose. Note that not all LLVM
-Value_\ s have names, and those without names (i.e. they have an empty name) do
+Value_\ s have names, and those without names (i.e., they have an empty name) do
not exist in the symbol table.
Symbol tables support iteration over the values in the symbol table with
@@ -3871,7 +3871,7 @@ Important Public Members of the ``Instruction`` class
* ``bool mayWriteToMemory()``
- Returns true if the instruction writes to memory, i.e. it is a ``call``,
+ Returns true if the instruction writes to memory, i.e., it is a ``call``,
``free``, ``invoke``, or ``store``.
* ``unsigned getOpcode()``
@@ -3881,7 +3881,7 @@ Important Public Members of the ``Instruction`` class
* ``Instruction *clone() const``
Returns another instance of the specified instruction, identical in all ways
- to the original except that the instruction has no parent (i.e. it's not
+ to the original except that the instruction has no parent (i.e., it's not
embedded into a BasicBlock_), and it has no name.
.. _Constant: