Files
swift-mirror/test/SIL/unimplemented_initializer.swift
Mark Lacey b45266d104 Allow the generic specializer to specialize transparent functions.
Reapply r26362, which was reverted in r26363 because a couple test
updates were not included.

Remove a questionable change from r17803. Based on the
radar (rdar://problem/16809311), it seems like the core issue this was
trying to fix either has to do with serialization or mangling.

I'd argue that if this fix were the right fix for anything, we need to
apply the same fix to any pass that specializes (and we have several of
those now).

This change by itself doesn't seem to have much performance impact, but
it is required for future changes, specifically marking protocol witness
thunks as @transparent, which is required to get the benefits we'd like
from devirtualizing during mandatory inlining.

Swift SVN r26378
2015-03-20 23:17:52 +00:00

20 lines
979 B
Swift

// RUN: %target-swift-frontend -sdk %S/../SILGen/Inputs -I %S/../SILGen/Inputs -enable-source-import -primary-file %s -emit-sil -emit-verbose-sil | FileCheck %s -check-prefix=CHECK-DEBUG
// RUN: %target-swift-frontend -sdk %S/../SILGen/Inputs -I %S/../SILGen/Inputs -enable-source-import -primary-file %s -emit-sil -emit-verbose-sil -O | FileCheck %s -check-prefix=CHECK-RELEASE
// XFAIL: linux
import gizmo
// Test that binaries compiled in release mode don't leak filenames of users'
// code through calls to runtime trap function for unimplemented initializers.
class DesignatedStubs : Gizmo {
override init() { super.init() }
}
// CHECK-DEBUG: sil hidden @_TFC25unimplemented_initializer15DesignatedStubscfMS0_FT7bellsOnSi_GSQS0__
// CHECK-DEBUG: string_literal utf8 "{{.*}}unimplemented_initializer.swift"
// CHECK-RELEASE: sil hidden @_TFC25unimplemented_initializer15DesignatedStubscfMS0_FT7bellsOnSi_GSQS0__
// CHECK-RELEASE-NOT: unimplemented_initializer.swift"