Skip to content

[SR-8272] _getBuiltinLogicValue() should be renamed #50803

@lattner

Description

@lattner
mannequin
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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions