Skip to content

Commit

Permalink
Merge pull request swiftlang#1376 from apple/remove-dead-code-stdlib
Browse files Browse the repository at this point in the history
stdlib: remove dead code
  • Loading branch information
gribozavr committed Feb 20, 2016
2 parents e354244 + 7e88bd7 commit 67fda25
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 40 deletions.
2 changes: 0 additions & 2 deletions docs/archive/LangRef.html
Original file line number Diff line number Diff line change
Expand Up @@ -1300,8 +1300,6 @@ <h3 id="type-optional">Optional Types</h3>
<li><code>func _doesOptionalHaveValueAsBool<T>(v : T?) -> Bool</code></li>
<li><code>func _diagnoseUnexpectedNilOptional()</code></li>
<li><code>func _getOptionalValue<T>(v : T?) -> T</code></li>
<li><code>func _injectValueIntoOptional<T>(v : T) -> T?</code></li>
<li><code>func _injectNothingIntoOptional<T>() -> T?</code></li>
</ul>
</p>

Expand Down
16 changes: 0 additions & 16 deletions stdlib/public/core/ImplicitlyUnwrappedOptional.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,6 @@ func _getImplicitlyUnwrappedOptionalValue<Wrapped>(v: Wrapped!) -> Wrapped {
}
}

@_transparent
@warn_unused_result
public // COMPILER_INTRINSIC
func _injectValueIntoImplicitlyUnwrappedOptional<Wrapped>(
v: Wrapped
) -> Wrapped! {
return .Some(v)
}

@_transparent
@warn_unused_result
public // COMPILER_INTRINSIC
func _injectNothingIntoImplicitlyUnwrappedOptional<Wrapped>() -> Wrapped! {
return .None
}

#if _runtime(_ObjC)
extension ImplicitlyUnwrappedOptional : _ObjectiveCBridgeable {
public static func _getObjectiveCType() -> Any.Type {
Expand Down
12 changes: 0 additions & 12 deletions stdlib/public/core/Optional.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,6 @@ func _getOptionalValue<Wrapped>(v: Wrapped?) -> Wrapped {
}
}

@_transparent
public // COMPILER_INTRINSIC
func _injectValueIntoOptional<Wrapped>(v: Wrapped) -> Wrapped? {
return .Some(v)
}

@_transparent
public // COMPILER_INTRINSIC
func _injectNothingIntoOptional<Wrapped>() -> Wrapped? {
return .None
}

// Comparisons
@warn_unused_result
public func == <T: Equatable> (lhs: T?, rhs: T?) -> Bool {
Expand Down
10 changes: 0 additions & 10 deletions stdlib/public/runtime/Casting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2221,16 +2221,6 @@ bool swift::swift_dynamicCast(OpaqueValue *dest,
_failCorruptType(srcType);
}

// The return type is incorrect. It is only important that it is
// passed using 'sret'.
extern "C" OpaqueExistentialContainer
_TFs24_injectValueIntoOptionalU__FQ_GSqQ__(OpaqueValue *value,
const Metadata *T);
// The return type is incorrect. It is only important that it is
// passed using 'sret'.
extern "C" OpaqueExistentialContainer
_TFs26_injectNothingIntoOptionalU__FT_GSqQ__(const Metadata *T);

static inline bool swift_isClassOrObjCExistentialTypeImpl(const Metadata *T) {
auto kind = T->getKind();
// Classes.
Expand Down

0 comments on commit 67fda25

Please sign in to comment.