|
5 | 5 | # (Objective-)C APIs, any API notes added on top of those APIs, and the
|
6 | 6 | # Clang importer itself. One can execute it to dump the API of a given
|
7 | 7 | # module within a particular SDK, e.g., UIKit from the iOS SDK as seen in
|
8 |
| -# Swift 3 compatibility mode: |
| 8 | +# Swift 4 compatibility mode: |
9 | 9 | #
|
10 |
| -# /path/to/bin/dir/swift-api-dump.py -swift-version 3 -o output-dir \ |
| 10 | +# /path/to/bin/dir/swift-api-dump.py -swift-version 4 -o output-dir \ |
11 | 11 | # -m UIKit -s iphoneos
|
12 | 12 | #
|
13 | 13 | # The "-m" argument can be omitted, in which case the script will collect
|
14 | 14 | # all of the frameworks in the named SDK(s) and dump their APIs.
|
15 | 15 | #
|
16 | 16 | # One can supply multiple SDKs, written as a list. For example, to
|
17 | 17 | # dump the API for all frameworks across macOS, iOS, watchOS, and tvOS,
|
18 |
| -# in Swift 4, use: |
| 18 | +# in Swift 4.2, use: |
19 | 19 | #
|
20 |
| -# /path/to/bin/dir/swift-api-dump.py -swift-version 4 -o output-dir \ |
| 20 | +# /path/to/bin/dir/swift-api-dump.py -swift-version 4.2 -o output-dir \ |
21 | 21 | # -s macosx iphoneos watchos appletvos
|
22 | 22 | #
|
23 | 23 |
|
@@ -102,7 +102,7 @@ def create_parser():
|
102 | 102 | parser.add_argument('--enable-infer-import-as-member', action='store_true',
|
103 | 103 | help='Infer when a global could be imported as a ' +
|
104 | 104 | 'member.')
|
105 |
| - parser.add_argument('-swift-version', type=int, metavar='N', |
| 105 | + parser.add_argument('-swift-version', metavar='N', |
106 | 106 | help='the Swift version to use')
|
107 | 107 | parser.add_argument('-show-overlay', action='store_true',
|
108 | 108 | help='Show overlay API in addition to Objective-C ' +
|
@@ -326,7 +326,7 @@ def main():
|
326 | 326 | if args.enable_infer_import_as_member:
|
327 | 327 | extra_args = extra_args + ['-enable-infer-import-as-member']
|
328 | 328 | if args.swift_version:
|
329 |
| - extra_args = extra_args + ['-swift-version', '%d' % args.swift_version] |
| 329 | + extra_args = extra_args + ['-swift-version', '%s' % args.swift_version] |
330 | 330 |
|
331 | 331 | # Create a .swift file we can feed into swift-ide-test
|
332 | 332 | subprocess.call(['touch', source_filename])
|
|
0 commit comments