Skip to content

Commit 561141c

Browse files
committed
---
yaml --- r: 340470 b: refs/heads/rxwei-patch-1 c: 729ad65 h: refs/heads/master
1 parent 4dfc336 commit 561141c

23 files changed

+234
-371
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: d3785d97bb1f6726a21b751310be433e72135338
1018+
refs/heads/rxwei-patch-1: 729ad65aa12c60a184efeeb37a3ac6fd3c4bd2e3
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/include/swift/AST/Decl.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ class alignas(1 << DeclAlignInBits) Decl {
370370
IsStatic : 1
371371
);
372372

373-
SWIFT_INLINE_BITFIELD(VarDecl, AbstractStorageDecl, 4+1+1+1+1+1,
373+
SWIFT_INLINE_BITFIELD(VarDecl, AbstractStorageDecl, 4+1+1+1+1,
374374
/// The specifier associated with this variable or parameter. This
375375
/// determines the storage semantics of the value e.g. mutability.
376376
Specifier : 4,
@@ -387,9 +387,6 @@ class alignas(1 << DeclAlignInBits) Decl {
387387
/// It is up to the debugger to instruct SIL how to access this variable.
388388
IsDebuggerVar : 1,
389389

390-
/// Whether this is a property defined in the debugger's REPL.
391-
/// FIXME: Remove this once LLDB has proper support for resilience.
392-
IsREPLVar : 1,
393390

394391
/// Whether this is the backing storage for a property wrapper.
395392
IsPropertyWrapperBackingProperty : 1
@@ -4806,7 +4803,6 @@ class VarDecl : public AbstractStorageDecl {
48064803
Bits.VarDecl.Specifier = static_cast<unsigned>(Sp);
48074804
Bits.VarDecl.IsCaptureList = IsCaptureList;
48084805
Bits.VarDecl.IsDebuggerVar = false;
4809-
Bits.VarDecl.IsREPLVar = false;
48104806
Bits.VarDecl.HasNonPatternBindingInit = false;
48114807
Bits.VarDecl.IsPropertyWrapperBackingProperty = false;
48124808
}
@@ -5095,12 +5091,6 @@ class VarDecl : public AbstractStorageDecl {
50955091
void setDebuggerVar(bool IsDebuggerVar) {
50965092
Bits.VarDecl.IsDebuggerVar = IsDebuggerVar;
50975093
}
5098-
5099-
/// Is this a special debugger REPL variable?
5100-
/// FIXME: Remove this once LLDB has proper support for resilience.
5101-
bool isREPLVar() const { return Bits.VarDecl.IsREPLVar; }
5102-
void setREPLVar(bool IsREPLVar) {
5103-
Bits.VarDecl.IsREPLVar = IsREPLVar;
51045094
}
51055095

51065096
/// Retrieve the custom attribute that attaches a property wrapper to this

branches/rxwei-patch-1/lib/SILOptimizer/Mandatory/OSLogOptimization.cpp

Lines changed: 173 additions & 275 deletions
Large diffs are not rendered by default.

branches/rxwei-patch-1/stdlib/private/OSLog/OSLog.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public struct Logger {
3838

3939
/// Log a string interpolation at a given level. The level is `default` if
4040
/// it is not specified.
41-
@_transparent
41+
@inlinable
42+
@_semantics("oslog.log")
4243
@_optimize(none)
4344
public func log(level: OSLogType = .default, _ message: OSLogMessage) {
4445
osLog(logObject, level, message)
@@ -102,7 +103,8 @@ internal func osLog(
102103
/// - message: An instance of `OSLogMessage` created from string interpolation
103104
/// - assertion: A closure that takes a format string and a pointer to a
104105
/// byte buffer and asserts a condition.
105-
@_transparent
106+
@inlinable
107+
@_semantics("oslog.log.test_helper")
106108
@_optimize(none)
107109
public // @testable
108110
func _checkFormatStringAndBuffer(

branches/rxwei-patch-1/stdlib/private/OSLog/OSLogMessage.swift

Lines changed: 14 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,7 @@ public struct OSLogInterpolation : StringInterpolationProtocol {
175175
@_optimize(none)
176176
public init(literalCapacity: Int, interpolationCount: Int) {
177177
// Since the format string is fully constructed at compile time,
178-
// the parameter `literalCapacity` is ignored.
179-
formatString = ""
180-
arguments = OSLogArguments(capacity: interpolationCount)
181-
preamble = 0
182-
argumentCount = 0
183-
totalBytesForSerializingArguments = 0
184-
}
185-
186-
/// An internal initializer that should be used only when there are no
187-
/// interpolated expressions. This function must be constant evaluable.
188-
@inlinable
189-
@_semantics("oslog.interpolation.init")
190-
@_optimize(none)
191-
internal init() {
178+
// the parameters `literalCapacity` and `interpolationCount` are ignored.
192179
formatString = ""
193180
arguments = OSLogArguments()
194181
preamble = 0
@@ -266,7 +253,6 @@ public struct OSLogInterpolation : StringInterpolationProtocol {
266253
}
267254

268255
/// Return true if and only if the parameter is .private.
269-
/// This function must be constant evaluable.
270256
@inlinable
271257
@_semantics("oslog.interpolation.isPrivate")
272258
@_effects(readonly)
@@ -366,24 +352,22 @@ public struct OSLogMessage :
366352
{
367353
public let interpolation: OSLogInterpolation
368354

369-
/// Initializer for accepting string interpolations. This function must be
370-
/// constant evaluable.
371-
@inlinable
355+
/// Initializer for accepting string interpolations.
356+
@_transparent
372357
@_optimize(none)
373-
@_semantics("oslog.message.init_interpolation")
374358
public init(stringInterpolation: OSLogInterpolation) {
375359
self.interpolation = stringInterpolation
376360
}
377361

378-
/// Initializer for accepting string literals. This function must be
379-
/// constant evaluable.
380-
@inlinable
362+
/// Initializer for accepting string literals.
363+
@_transparent
381364
@_optimize(none)
382-
@_semantics("oslog.message.init_stringliteral")
383365
public init(stringLiteral value: String) {
384-
var s = OSLogInterpolation()
366+
// Note that the actual value of `literalCapacity` is not important as it
367+
// is ignored by `OSLogInterpolation.init`.
368+
var s = OSLogInterpolation(literalCapacity: 1, interpolationCount: 0)
385369
s.appendLiteral(value)
386-
self.interpolation = s
370+
self.init(stringInterpolation: s)
387371
}
388372

389373
/// The byte size of the buffer that will be passed to the C os_log ABI.
@@ -396,50 +380,38 @@ public struct OSLogMessage :
396380
}
397381
}
398382

399-
400383
/// A representation of a sequence of arguments and headers (of possibly
401384
/// different types) that have to be serialized to a byte buffer. The arguments
402385
/// are captured within closures and stored in an array. The closures accept an
403386
/// instance of `OSLogByteBufferBuilder`, and when invoked, serialize the
404387
/// argument using the passed `OSLogByteBufferBuilder` instance.
405-
@_fixed_layout
406388
@usableFromInline
407389
internal struct OSLogArguments {
408390
/// An array of closures that captures arguments of possibly different types.
409-
@usableFromInline
410-
internal var argumentClosures: [(inout OSLogByteBufferBuilder) -> ()]?
411-
412-
/// This function must be constant evaluable.
413-
@inlinable
414-
@_semantics("oslog.arguments.init_empty")
415-
@_optimize(none)
416-
internal init() {
417-
argumentClosures = nil
418-
}
391+
internal var argumentClosures: [(inout OSLogByteBufferBuilder) -> ()]
419392

420393
@usableFromInline
421-
internal init(capacity: Int) {
394+
internal init() {
422395
argumentClosures = []
423-
argumentClosures!.reserveCapacity(capacity)
424396
}
425397

426398
/// Append a byte-sized header, constructed by
427399
/// `OSLogMessage.appendInterpolation`, to the tracked array of closures.
428400
@usableFromInline
429401
internal mutating func append(_ header: UInt8) {
430-
argumentClosures!.append({ $0.serialize(header) })
402+
argumentClosures.append({ $0.serialize(header) })
431403
}
432404

433405
/// Append an (autoclosured) interpolated expression of type Int, passed to
434406
/// `OSLogMessage.appendInterpolation`, to the tracked array of closures.
435407
@usableFromInline
436408
internal mutating func append(_ value: @escaping () -> Int) {
437-
argumentClosures!.append({ $0.serialize(value()) })
409+
argumentClosures.append({ $0.serialize(value()) })
438410
}
439411

440412
@usableFromInline
441413
internal func serialize(into bufferBuilder: inout OSLogByteBufferBuilder) {
442-
argumentClosures?.forEach { $0(&bufferBuilder) }
414+
argumentClosures.forEach { $0(&bufferBuilder) }
443415
}
444416
}
445417

branches/rxwei-patch-1/test/SILOptimizer/OSLogPrototypeCompileDiagnostics.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ import OSLogPrototype
1212
if #available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
1313

1414
func testDynamicLogMessage(h: Logger, message: OSLogMessage) {
15-
// FIXME: log APIs must always be passed a string interpolation literal.
16-
// Diagnose this.
17-
h.log(level: .debug, message)
15+
h.log(level: .debug, message) // expected-error {{os log methods must be passed a string interpolation literal. 'OSLogMessage' must not be constructed explicitly}}
1816
}
1917

2018
func testNonconstantFormatOption(h: Logger, formatOpt: IntFormat) {

branches/rxwei-patch-1/test/SILOptimizer/OSLogPrototypeCompileTest.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if #available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
2828
// Check integer constants passed to the withCString closure: buffersize,
2929
// premable and argument count.
3030

31-
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @guaranteed OSLogArguments) -> ()
31+
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @inout_aliasable OSLogArguments) -> ()
3232
// CHECK-DAG: [[OSLOGCLOSURE]] = function_ref @$s14OSLogPrototype5osLogyySo03OS_C4_logC_So0c1_F7_type_taAA0A7MessageVtFySPys4Int8VGXEfU_
3333
// CHECK-DAG: [[BUFFERSIZE]] = struct $Int ([[BUFFERSIZELIT:%[0-9]+]]
3434
// CHECK-64-DAG: [[BUFFERSIZELIT]] = integer_literal $Builtin.Int64, 12
@@ -55,7 +55,7 @@ if #available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
5555
// Check integer constants passed to the withCString closure: buffersize,
5656
// premable and argument count.
5757

58-
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @guaranteed OSLogArguments) -> ()
58+
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @inout_aliasable OSLogArguments) -> ()
5959
// CHECK-DAG: [[OSLOGCLOSURE]] = function_ref @$s14OSLogPrototype5osLogyySo03OS_C4_logC_So0c1_F7_type_taAA0A7MessageVtFySPys4Int8VGXEfU_
6060
// CHECK-DAG: [[BUFFERSIZE]] = struct $Int ([[BUFFERSIZELIT:%[0-9]+]]
6161
// CHECK-64-DAG: [[BUFFERSIZELIT]] = integer_literal $Builtin.Int64, 12
@@ -85,7 +85,7 @@ if #available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
8585
// Check integer constants passed to the withCString closure: buffersize,
8686
// premable and argument count.
8787

88-
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @guaranteed OSLogArguments) -> ()
88+
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @inout_aliasable OSLogArguments) -> ()
8989
// CHECK-DAG: [[OSLOGCLOSURE]] = function_ref @$s14OSLogPrototype5osLogyySo03OS_C4_logC_So0c1_F7_type_taAA0A7MessageVtFySPys4Int8VGXEfU_
9090
// CHECK-DAG: [[BUFFERSIZE]] = struct $Int ([[BUFFERSIZELIT:%[0-9]+]]
9191
// CHECK-64-DAG: [[BUFFERSIZELIT]] = integer_literal $Builtin.Int64, 12
@@ -119,7 +119,7 @@ if #available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
119119
// Check integer constants passed to the withCString closure: buffersize,
120120
// premable and argument count.
121121

122-
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @guaranteed OSLogArguments) -> ()
122+
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @inout_aliasable OSLogArguments) -> ()
123123
// CHECK-DAG: [[OSLOGCLOSURE]] = function_ref @$s14OSLogPrototype5osLogyySo03OS_C4_logC_So0c1_F7_type_taAA0A7MessageVtFySPys4Int8VGXEfU_
124124
// CHECK-DAG: [[BUFFERSIZE]] = struct $Int ([[BUFFERSIZELIT:%[0-9]+]]
125125
// CHECK-64-DAG: [[BUFFERSIZELIT]] = integer_literal $Builtin.Int64, 32
@@ -152,7 +152,7 @@ if #available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
152152
// Check other constants passed to the withCString closure: buffersize,
153153
// premable and argument count.
154154

155-
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @guaranteed OSLogArguments) -> ()
155+
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @inout_aliasable OSLogArguments) -> ()
156156
// CHECK-DAG: [[OSLOGCLOSURE]] = function_ref @$s14OSLogPrototype5osLogyySo03OS_C4_logC_So0c1_F7_type_taAA0A7MessageVtFySPys4Int8VGXEfU_
157157
// CHECK-DAG: [[BUFFERSIZE]] = struct $Int ([[BUFFERSIZELIT:%[0-9]+]]
158158
// CHECK-DAG: [[BUFFERSIZELIT]] = integer_literal $Builtin.Int{{[0-9]+}}, 2
@@ -223,7 +223,7 @@ if #available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
223223
// Check integer constants passed to the withCString closure: buffersize,
224224
// premable and argument count.
225225

226-
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @guaranteed OSLogArguments) -> ()
226+
// CHECK-DAG: {{%.*}} = partial_apply [callee_guaranteed] [on_stack] [[OSLOGCLOSURE:%[0-9]+]]({{%.*}}, {{%.*}}, [[BUFFERSIZE:%[0-9]+]], [[PREAMBLE:%[0-9]+]], [[ARGCOUNT:%[0-9]+]], {{%.*}}) : $@convention(thin) (UnsafePointer<Int8>, @guaranteed OSLog, OSLogType, Int, UInt8, UInt8, @inout_aliasable OSLogArguments) -> ()
227227
// CHECK-DAG: [[OSLOGCLOSURE]] = function_ref @$s14OSLogPrototype5osLogyySo03OS_C4_logC_So0c1_F7_type_taAA0A7MessageVtFySPys4Int8VGXEfU_
228228
// CHECK-DAG: [[BUFFERSIZE]] = struct $Int ([[BUFFERSIZELIT:%[0-9]+]]
229229
// CHECK-64-DAG: [[BUFFERSIZELIT]] = integer_literal $Builtin.Int64, 482

branches/rxwei-patch-1/test/lit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,7 @@ config.target_resilience_test = (
13941394

13951395
# FIXME: Get symbol diffing working with binutils nm as well. The flags are slightly
13961396
# different.
1397-
if platform.system() != 'Darwin' or swift_test_mode == 'optimize_none_with_implicit_dynamic':
1397+
if platform.system() != 'Darwin':
13981398
config.target_resilience_test = ('%s --no-symbol-diff' %
13991399
config.target_resilience_test)
14001400

branches/rxwei-patch-1/utils/api_checker/sdk-module-lists/infer-imports.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def get_immediate_subdirectories(a_dir):
1515
if os.path.isdir(os.path.join(a_dir, name))]
1616

1717

18-
def get_frameworks(sdk_path, swift_frameworks_only):
18+
def get_frameworks(sdk_path):
1919
frameworks_path = sdk_path + "/System/Library/Frameworks"
2020
names = []
2121
for frame in os.listdir(frameworks_path):
@@ -32,9 +32,6 @@ def get_frameworks(sdk_path, swift_frameworks_only):
3232
if name not in blacklist:
3333
names.append(name)
3434
continue
35-
# We only care about Swift frameworks then we are done.
36-
if swift_frameworks_only:
37-
continue
3835

3936
if not os.path.exists(header_dir_path):
4037
if os.path.exists(module_dir_path):
@@ -98,8 +95,7 @@ def main():
9895
parser.add_option("-o", "--output", help="output mode",
9996
type=str, dest="out_mode", default="list")
10097
parser.add_option("--hash", action="store_true", dest="use_hash")
101-
parser.add_option("--swift-frameworks-only", action="store_true")
102-
parser.add_option("--v", action="store_true")
98+
10399
(opts, cmd) = parser.parse_args()
104100

105101
if not opts.sdk:
@@ -109,10 +105,7 @@ def main():
109105
parser.error(
110106
"output mode not specified: 'clang-import'/'swift-import'/'list'")
111107

112-
frames = get_frameworks(opts.sdk, opts.swift_frameworks_only)
113-
if opts.v:
114-
for name in frames:
115-
print >>sys.stderr, 'Including: ', name
108+
frames = get_frameworks(opts.sdk)
116109
if opts.out_mode == "clang-import":
117110
print_clang_imports(frames, opts.use_hash)
118111
elif opts.out_mode == "swift-import":

branches/rxwei-patch-1/utils/api_checker/swift-api-checker.py

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,8 @@ def get_sdk_path(platform):
4747
return check_output(['xcrun', '-sdk', platform, '-show-sdk-path'])
4848

4949

50-
def prepare_module_list(platform, file, verbose, swift_frameworks_only):
51-
cmd = [INFER_IMPORT_PATH, '-s', get_sdk_path(platform)]
52-
if swift_frameworks_only:
53-
cmd.extend(['--swift-frameworks-only'])
54-
if verbose:
55-
cmd.extend(['--v'])
56-
check_call(cmd, output=file)
57-
# The fixed modules are all objc frameworks.
58-
if swift_frameworks_only:
59-
return
50+
def prepare_module_list(platform, file):
51+
check_call([INFER_IMPORT_PATH, '-s', get_sdk_path(platform)], output=file)
6052
with open(INFER_IMPORT_DIR + '/fixed-modules-common.txt', 'r') as extra:
6153
file.write(extra.read())
6254
with open(INFER_IMPORT_DIR + '/fixed-modules-' + platform + '.txt',
@@ -86,8 +78,7 @@ def __init__(self, tool_path, platform):
8678
self.sdk + '/System/Library/Frameworks/',
8779
os.path.realpath(self.sdk + '/../../Library/Frameworks/')]
8880

89-
def run(self, output, module, swift_ver, opts, verbose,
90-
swift_frameworks_only):
81+
def run(self, output, module, swift_ver, opts, verbose):
9182
cmd = [self.tool_path, '-o', output, '-sdk', self.sdk, '-target',
9283
self.target, '-dump-sdk', '-module-cache-path',
9384
'/tmp/ModuleCache', '-swift-version',
@@ -102,8 +93,7 @@ def run(self, output, module, swift_ver, opts, verbose,
10293
check_call(cmd, verbose=verbose)
10394
else:
10495
with tempfile.NamedTemporaryFile() as tmp:
105-
prepare_module_list(self.platform, tmp, verbose,
106-
swift_frameworks_only)
96+
prepare_module_list(self.platform, tmp)
10797
cmd.extend(['-module-list-file', tmp.name])
10898
check_call(cmd, verbose=verbose)
10999

@@ -157,10 +147,6 @@ def main():
157147
name of the module/framework to generate baseline, e.g. Foundation
158148
''')
159149

160-
basic_group.add_argument('--swift-frameworks-only',
161-
action='store_true',
162-
help='Only include Swift frameworks in the dump')
163-
164150
basic_group.add_argument('--opts', nargs='+', default=[], help='''
165151
additional flags to pass to swift-api-digester
166152
''')
@@ -190,8 +176,7 @@ def main():
190176
runner = DumpConfig(tool_path=args.tool_path, platform=args.target)
191177
runner.run(output=args.output, module=args.module,
192178
swift_ver=args.swift_version, opts=args.opts,
193-
verbose=args.v,
194-
swift_frameworks_only=args.swift_frameworks_only)
179+
verbose=args.v)
195180
elif args.action == 'diagnose':
196181
if not args.dump_before:
197182
fatal_error("Need to specify --dump-before")

branches/rxwei-patch-1/validation-test/Evolution/test_bitwise_takable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %target-resilience-test
22
// REQUIRES: executable_test
33

4+
// UNSUPPORTED: swift_test_mode_optimize_none_with_implicit_dynamic
5+
46
import StdlibUnittest
57
import bitwise_takable
68

branches/rxwei-patch-1/validation-test/Evolution/test_class_change_size.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %target-resilience-test
22
// REQUIRES: executable_test
33

4+
// UNSUPPORTED: swift_test_mode_optimize_none_with_implicit_dynamic
5+
46
import StdlibUnittest
57
import class_change_size
68

branches/rxwei-patch-1/validation-test/Evolution/test_class_insert_superclass.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %target-resilience-test
22
// REQUIRES: executable_test
33

4+
// UNSUPPORTED: swift_test_mode_optimize_none_with_implicit_dynamic
5+
46
import StdlibUnittest
57
import class_insert_superclass
68

0 commit comments

Comments
 (0)