-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
affects ABIFlag: Affects ABIFlag: Affects ABIcompilerThe Swift compiler itselfThe Swift compiler itselfimprovementstandard libraryArea: Standard library umbrellaArea: Standard library umbrella
Description
Previous ID | SR-8272 |
Radar | None |
Original Reporter | @lattner |
Type | Improvement |
Status | Resolved |
Resolution | Done |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler, Standard Library |
Labels | Improvement, AffectsABI |
Assignee | @CodaFi |
Priority | Medium |
md5: ae15273d46b2d78478844ef00fc771de
Issue Description:
The standard library has this defined in Bool.swift:
extension Bool {
// This is a magic entry point known to the compiler.
@inlinable // FIXME(sil-serialize-all)
@_transparent
@compilerEvaluable
public // COMPILER_INTRINSIC
func _getBuiltinLogicValue() -> Builtin.Int1 {
return _value
}
}
This is a public symbol so it will be burned into the ABI. The name "LogicValue" was removed a very long time ago though, so this should be renamed to something more sensible. Alternatively, the compiler could be taught to just form bool directly, which is pragmatic and trivial.
Metadata
Metadata
Assignees
Labels
affects ABIFlag: Affects ABIFlag: Affects ABIcompilerThe Swift compiler itselfThe Swift compiler itselfimprovementstandard libraryArea: Standard library umbrellaArea: Standard library umbrella