Skip to content

Commit c66fdac

Browse files
committed
Revert "Generalize omit-needless-words script to swift-api-dump."
This reverts commit a4e4af0.
1 parent 79c1f38 commit c66fdac

File tree

2 files changed

+5
-25
lines changed

2 files changed

+5
-25
lines changed

utils/CMakeLists.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,3 @@ swift_install_in_component(editor-integration
88
FILES swift-mode.el
99
DESTINATION "share/emacs/site-lisp")
1010

11-
swift_install_in_component(editor-integration
12-
FILES swift-mode.el
13-
DESTINATION "share/emacs/site-lisp")
14-
15-
swift_install_in_component(tools
16-
TARGETS swift-api-dump.py
17-
RUNTIME DESTINATION bin)
18-
19-
# Create a symlink for swift-api-dump.py in the bin directory
20-
add_custom_target(swift-api-dump ALL
21-
COMMAND
22-
"${CMAKE_COMMAND}" "-E" "create_symlink"
23-
"${CMAKE_CURRENT_SOURCE_DIR}/swift-api-dump.py"
24-
"${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-api-dump.py"
25-
COMMENT "Creating development symlink for swift-api-dump.py")

utils/swift-api-dump.py renamed to utils/omit-needless-words.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
#!/usr/bin/env python
22

3-
# This tool helps dump the APIs of imported modules for a module, SDK,
4-
# or set of SDKs. It is primarily useful in determining the effect of
5-
# changes to the Clang importer.
3+
# This tool helps assess the impact of automatically applying
4+
# heuristics that omit 'needless' words from APIs imported from Clang
5+
# into Swift.
66

77
from __future__ import print_function
88

99
import argparse
10-
import multiprocessing
1110
import os
1211
import re
1312
import subprocess
14-
import sys
13+
import multiprocessing
1514

1615
DEFAULT_TARGET_BASED_ON_SDK = {
1716
'macosx': 'x86_64-apple-macosx10.11',
@@ -47,10 +46,6 @@
4746
}
4847

4948
def create_parser():
50-
script_path = os.path.dirname(sys.argv[0])
51-
script_path = os.path.abspath(script_path)
52-
default_swift_ide_test = '%s/swift-ide-test' % (script_path)
53-
5449
parser = argparse.ArgumentParser(
5550
description="Determines the effects of omitting 'needless' words from imported APIs",
5651
prog='omit-needless-words.py',
@@ -59,7 +54,7 @@ def create_parser():
5954
parser.add_argument('-j', '--jobs', type=int, help='The number of parallel jobs to execute')
6055
parser.add_argument('-s', '--sdk', nargs='+', required=True, help="The SDKs to use.")
6156
parser.add_argument('-t', '--target', help="The target triple to use.")
62-
parser.add_argument('-i', '--swift-ide-test', default=default_swift_ide_test, help="The swift-ide-test executable.")
57+
parser.add_argument('-i', '--swift-ide-test', default='swift-ide-test', help="The swift-ide-test executable.")
6358
parser.add_argument('-3', '--swift-3', action='store_true', help="Use Swift 3 transformation")
6459
parser.add_argument('-o', '--output-dir', default=os.getcwd(), help='Directory to which the output will be emitted.')
6560
parser.add_argument('-q', '--quiet', action='store_true', help='Suppress printing of status messages.')

0 commit comments

Comments
 (0)