Skip to content

Commit 9a82329

Browse files
committed
Merge pull request #2229 from hitstergtd/hitstergtd-docfixes-2
[gardening] [docs] Properly capitalise 'swift' to 'Swift'
2 parents 10dbb3a + 1ccca9d commit 9a82329

7 files changed

+18
-18
lines changed

Diff for: docs/ARCOptimization.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ARC Optimization for Swift
88

99
.. admonition:: TODO
1010

11-
This is an evolving document on ARC optimization in the swift
11+
This is an evolving document on ARC optimization in the Swift
1212
compiler. Please extend it.
1313

1414
Terms
@@ -332,7 +332,7 @@ is_unique performs depends on the argument type:
332332
(Builtin.NativeObject, known native class reference)
333333

334334
- Objective-C object types require an additional check that the
335-
dynamic object type uses native swift reference counting:
335+
dynamic object type uses native Swift reference counting:
336336
(Builtin.UnknownObject, unknown class reference, class existential)
337337

338338
- Bridged object types allow the dynamic object type check to be
@@ -342,7 +342,7 @@ is_unique performs depends on the argument type:
342342
Any of the above types may also be wrapped in an optional. If the
343343
static argument type is optional, then a null check is also performed.
344344

345-
Thus, is_unique only returns true for non-null, native swift object
345+
Thus, is_unique only returns true for non-null, native Swift object
346346
references with a strong reference count of one.
347347

348348
is_unique_or_pinned has the same semantics as is_unique except that it

Diff for: docs/DebuggingTheCompiler.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Abstract
99
--------
1010

1111
This document contains some useful information for debugging the
12-
swift compiler and swift compiler output.
12+
Swift compiler and Swift compiler output.
1313

1414
Printing the Intermediate Representations
1515
-----------------------------------------
1616

1717
The most important thing when debugging the compiler is to examine the IR.
18-
Here is how to dump the IR after the main phases of the swift compiler
18+
Here is how to dump the IR after the main phases of the Swift compiler
1919
(assuming you are compiling with optimizations enabled):
2020

2121
#. **Parser**. To print the AST after parsing::
@@ -83,7 +83,7 @@ For details see ``PassManager.cpp``.
8383
Dumping the SIL and other Data in LLDB
8484
``````````````````````````````````````
8585

86-
When debugging the swift compiler with LLDB (or Xcode, of course), there is
86+
When debugging the Swift compiler with LLDB (or Xcode, of course), there is
8787
even a more powerful way to examine the data in the compiler, e.g. the SIL.
8888
Following LLVM's dump() convention, many SIL classes (as well as AST classes)
8989
provide a dump() function. You can call the dump function with LLDB's
@@ -123,7 +123,7 @@ debugging add the front-end option -gsil together with -g. Example::
123123

124124
This writes the SIL after optimizations into a file and generates debug info
125125
for it. In the debugger and profiler you can then see the SIL code instead of
126-
the swift source code.
126+
the Swift source code.
127127
For details see the SILDebugInfoGenerator pass.
128128

129129
To enable SIL debugging and profiling for the Swift standard library, use
@@ -141,7 +141,7 @@ Using Breakpoints
141141
`````````````````
142142

143143
LLDB has very powerful breakpoints, which can be utilized in many ways to debug
144-
the compiler and swift executables. The examples in this section show the LLDB
144+
the compiler and Swift executables. The examples in this section show the LLDB
145145
command lines. In Xcode you can set the breakpoint properties by clicking 'Edit
146146
breakpoint'.
147147

@@ -236,7 +236,7 @@ generality will be called test.lldb)::
236236
c
237237
dis -f
238238

239-
TODO: Change this example to apply to the swift compiler instead of to the
239+
TODO: Change this example to apply to the Swift compiler instead of to the
240240
stdlib unittests.
241241

242242
Then by running ``lldb test -s test.lldb``, lldb will:
@@ -256,14 +256,14 @@ needing to retype the various commands perfectly every time.
256256
Debugging Swift Executables
257257
---------------------------
258258

259-
One can use the previous tips for debugging the swift compiler with swift
259+
One can use the previous tips for debugging the Swift compiler with Swift
260260
executables as well. Here are some additional useful techniques that one can use
261261
in Swift executables.
262262

263263
Determining the mangled name of a function in LLDB
264264
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
265265

266-
One problem that often comes up when debugging swift code in LLDB is that LLDB
266+
One problem that often comes up when debugging Swift code in LLDB is that LLDB
267267
shows the demangled name instead of the mangled name. This can lead to mistakes
268268
where due to the length of the mangled names one will look at the wrong
269269
function. Using the following command, one can find the mangled name of the

Diff for: docs/Generics.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ interface, e.g. (in Java)::
204204

205205
.. @ignore()
206206
.. This test just doesn't compile at the moment, but that represents a
207-
bug in swift
207+
bug in Swift
208208
209209
and then a class X that wants to be Comparable will inherit from
210210
Comparable<X>. This is ugly and has a number of pitfalls; see

Diff for: docs/HighLevelSILOptimizations.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ getElement instruction::
9696

9797
Swift optimizations
9898
-------------------
99-
The swift optimizer can access the information that is provided by the
99+
The Swift optimizer can access the information that is provided by the
100100
``@_semantics`` attribute to perform high-level optimizations. In the early
101101
stages of the optimization pipeline the optimizer does not inline functions
102102
with special semantics in order to allow the early high-level optimization

Diff for: docs/OptimizationTips.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ about 10 times.
386386

387387
Game(10).play
388388

389-
The cost of large swift values
389+
The cost of large Swift values
390390
==============================
391391

392392
In Swift, values keep a unique copy of their data. There are several advantages
@@ -501,12 +501,12 @@ The type ``Box`` can replace the array in the code sample above.
501501
Unsafe code
502502
===========
503503

504-
Swift classes are always reference counted. The swift compiler inserts code
504+
Swift classes are always reference counted. The Swift compiler inserts code
505505
that increments the reference count every time the object is accessed.
506506
For example, consider the problem of scanning a linked list that's
507507
implemented using classes. Scanning the list is done by moving a
508508
reference from one node to the next: ``elem = elem.next``. Every time we move
509-
the reference swift will increment the reference count of the ``next`` object
509+
the reference Swift will increment the reference count of the ``next`` object
510510
and decrement the reference count of the previous object. These reference
511511
count operations are expensive and unavoidable when using Swift classes.
512512

Diff for: docs/SIL.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ IR.
115115
- **Performance Inlining**
116116
- **Reference Counting Optimizations**
117117
- **Memory Promotion/Optimizations**
118-
- **High-level domain specific optimizations** The swift compiler implements
118+
- **High-level domain specific optimizations** The Swift compiler implements
119119
high-level optimizations on basic Swift containers such as Array or String.
120120
Domain specific optimizations require a defined interface between
121121
the standard library and the optimizer. More details can be found here:

Diff for: docs/StringDesign.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ __ https://en.wikipedia.org/wiki/First-class_citizen
151151
|swift| var s = "Yo"
152152
`// s:` :emph:`String` `= "Yo"`
153153
154-
Unlike, say, C's ``char*``, the meaning of a swift string is always
154+
Unlike, say, C's ``char*``, the meaning of a Swift string is always
155155
unambiguous.
156156

157157
Strings are **Efficient**

0 commit comments

Comments
 (0)