Move nil/_Nil into the core library and add UnsafePointer<T> support.

Fixes <rdar://problem/15933510>.


Swift SVN r13094
This commit is contained in:
Doug Gregor
2014-01-29 06:30:28 +00:00
parent 6e280a83ee
commit eaf3e5c68d
3 changed files with 17 additions and 2 deletions

12
stdlib/core/Nil.swift Normal file
View File

@@ -0,0 +1,12 @@
@asmname="swift_makeUnsafeNil" func _makeUnsafeNil() -> AnyObject
struct _Nil {
@conversion func __conversion() -> AnyObject {
return _makeUnsafeNil()
}
}
/// A null pointer constant.
var nil : _Nil {
return _Nil()
}