Skip to content

Commit a3d0488

Browse files
kazutakahiratackoparkar
authored andcommitted
[llvm] Proofread LangRef.rst (llvm#165973)
1 parent 6245bc7 commit a3d0488

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

llvm/docs/LangRef.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ representation is not just an integer address are called "non-integral".
668668
Non-integral pointers have at least one of the following three properties:
669669

670670
* the pointer representation contains non-address bits
671-
* the pointer representation is unstable (may changed at any time in a
671+
* the pointer representation is unstable (may change at any time in a
672672
target-specific way)
673673
* the pointer representation has external state
674674

@@ -757,7 +757,7 @@ The following restrictions apply to IR level optimization passes:
757757

758758
The ``inttoptr`` instruction does not recreate the external state and therefore
759759
it is target dependent whether it can be used to create a dereferenceable
760-
pointer. In general passes should assume that the result of such an inttoptr
760+
pointer. In general passes should assume that the result of such an ``inttoptr``
761761
is not dereferenceable. For example, on CHERI targets an ``inttoptr`` will
762762
yield a capability with the external state (the validity tag bit) set to zero,
763763
which will cause any dereference to trap.
@@ -784,7 +784,7 @@ be performed as loads and stores of the correct type since stores of other
784784
types may not propagate the external data.
785785
Therefore it is not legal to convert an existing load/store (or a
786786
``llvm.memcpy`` / ``llvm.memmove`` intrinsic) of pointer types with external
787-
state to a load/store of an integer type with same bitwidth, as that may drop
787+
state to a load/store of an integer type with the same bitwidth, as that may drop
788788
the external state.
789789

790790

@@ -806,7 +806,7 @@ Global variables can optionally specify a :ref:`linkage type <linkage>`.
806806
Either global variable definitions or declarations may have an explicit section
807807
to be placed in and may have an optional explicit alignment specified. If there
808808
is a mismatch between the explicit or inferred section information for the
809-
variable declaration and its definition the resulting behavior is undefined.
809+
variable declaration and its definition, the resulting behavior is undefined.
810810

811811
A variable may be defined as a global ``constant``, which indicates that
812812
the contents of the variable will **never** be modified (enabling better
@@ -1334,7 +1334,7 @@ Currently, only the following parameter attributes are defined:
13341334
The byval type argument indicates the in-memory value type.
13351335

13361336
The byval attribute also supports specifying an alignment with the
1337-
align attribute. It indicates the alignment of the stack slot to
1337+
``align`` attribute. It indicates the alignment of the stack slot to
13381338
form and the known alignment of the pointer specified to the call
13391339
site. If the alignment is not specified, then the code generator
13401340
makes a target-specific assumption.
@@ -1355,7 +1355,7 @@ Currently, only the following parameter attributes are defined:
13551355

13561356
This is not a valid attribute for return values.
13571357

1358-
The alignment for an ``byref`` parameter can be explicitly
1358+
The alignment for a ``byref`` parameter can be explicitly
13591359
specified by combining it with the ``align`` attribute, similar to
13601360
``byval``. If the alignment is not specified, then the code generator
13611361
makes a target-specific assumption.
@@ -1382,7 +1382,7 @@ Currently, only the following parameter attributes are defined:
13821382
The preallocated attribute requires a type argument.
13831383

13841384
The preallocated attribute also supports specifying an alignment with the
1385-
align attribute. It indicates the alignment of the stack slot to
1385+
``align`` attribute. It indicates the alignment of the stack slot to
13861386
form and the known alignment of the pointer specified to the call
13871387
site. If the alignment is not specified, then the code generator
13881388
makes a target-specific assumption.
@@ -1550,15 +1550,15 @@ Currently, only the following parameter attributes are defined:
15501550

15511551
``nonnull``
15521552
This indicates that the parameter or return pointer is not null. This
1553-
attribute may only be applied to pointer typed parameters. This is not
1553+
attribute may only be applied to pointer-typed parameters. This is not
15541554
checked or enforced by LLVM; if the parameter or return pointer is null,
15551555
:ref:`poison value <poisonvalues>` is returned or passed instead.
15561556
The ``nonnull`` attribute should be combined with the ``noundef`` attribute
15571557
to ensure a pointer is not null or otherwise the behavior is undefined.
15581558

15591559
``dereferenceable(<n>)``
15601560
This indicates that the parameter or return pointer is dereferenceable. This
1561-
attribute may only be applied to pointer typed parameters. A pointer that
1561+
attribute may only be applied to pointer-typed parameters. A pointer that
15621562
is dereferenceable can be loaded from speculatively without a risk of
15631563
trapping. The number of bytes known to be dereferenceable must be provided
15641564
in parentheses. It is legal for the number of bytes to be less than the
@@ -1584,7 +1584,7 @@ Currently, only the following parameter attributes are defined:
15841584
implies that a pointer is at least one of ``dereferenceable(<n>)``
15851585
or ``null`` (i.e., it may be both ``null`` and
15861586
``dereferenceable(<n>)``). This attribute may only be applied to
1587-
pointer typed parameters.
1587+
pointer-typed parameters.
15881588

15891589
``swiftself``
15901590
This indicates that the parameter is the self/context parameter. This is not
@@ -1601,7 +1601,7 @@ Currently, only the following parameter attributes are defined:
16011601

16021602
``swifterror``
16031603
This attribute is motivated to model and optimize Swift error handling. It
1604-
can be applied to a parameter with pointer to pointer type or a
1604+
can be applied to a parameter with pointer-to-pointer type or a
16051605
pointer-sized alloca. At the call site, the actual argument that corresponds
16061606
to a ``swifterror`` parameter has to come from a ``swifterror`` alloca or
16071607
the ``swifterror`` parameter of the caller. A ``swifterror`` value (either

0 commit comments

Comments
 (0)