Revert "Generalize omit-needless-words script to swift-api-dump."

This reverts commit a4e4af0c40.
This commit is contained in:
Chris Lattner
2016-02-09 22:22:27 -08:00
parent 79c1f38724
commit c66fdac034
2 changed files with 5 additions and 25 deletions

View File

@@ -8,18 +8,3 @@ swift_install_in_component(editor-integration
FILES swift-mode.el
DESTINATION "share/emacs/site-lisp")
swift_install_in_component(editor-integration
FILES swift-mode.el
DESTINATION "share/emacs/site-lisp")
swift_install_in_component(tools
TARGETS swift-api-dump.py
RUNTIME DESTINATION bin)
# Create a symlink for swift-api-dump.py in the bin directory
add_custom_target(swift-api-dump ALL
COMMAND
"${CMAKE_COMMAND}" "-E" "create_symlink"
"${CMAKE_CURRENT_SOURCE_DIR}/swift-api-dump.py"
"${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-api-dump.py"
COMMENT "Creating development symlink for swift-api-dump.py")

View File

@@ -1,17 +1,16 @@
#!/usr/bin/env python
# This tool helps dump the APIs of imported modules for a module, SDK,
# or set of SDKs. It is primarily useful in determining the effect of
# changes to the Clang importer.
# This tool helps assess the impact of automatically applying
# heuristics that omit 'needless' words from APIs imported from Clang
# into Swift.
from __future__ import print_function
import argparse
import multiprocessing
import os
import re
import subprocess
import sys
import multiprocessing
DEFAULT_TARGET_BASED_ON_SDK = {
'macosx': 'x86_64-apple-macosx10.11',
@@ -47,10 +46,6 @@ SKIPPED_FRAMEWORKS = {
}
def create_parser():
script_path = os.path.dirname(sys.argv[0])
script_path = os.path.abspath(script_path)
default_swift_ide_test = '%s/swift-ide-test' % (script_path)
parser = argparse.ArgumentParser(
description="Determines the effects of omitting 'needless' words from imported APIs",
prog='omit-needless-words.py',
@@ -59,7 +54,7 @@ def create_parser():
parser.add_argument('-j', '--jobs', type=int, help='The number of parallel jobs to execute')
parser.add_argument('-s', '--sdk', nargs='+', required=True, help="The SDKs to use.")
parser.add_argument('-t', '--target', help="The target triple to use.")
parser.add_argument('-i', '--swift-ide-test', default=default_swift_ide_test, help="The swift-ide-test executable.")
parser.add_argument('-i', '--swift-ide-test', default='swift-ide-test', help="The swift-ide-test executable.")
parser.add_argument('-3', '--swift-3', action='store_true', help="Use Swift 3 transformation")
parser.add_argument('-o', '--output-dir', default=os.getcwd(), help='Directory to which the output will be emitted.')
parser.add_argument('-q', '--quiet', action='store_true', help='Suppress printing of status messages.')