Commit Graph

5 Commits

Author SHA1 Message Date
Michael Gottesman
84d356333a Add in a uintptr_t cast to quiet warning. 2016-02-06 11:22:27 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Jordan Rose
042569a3be Optional: Replace uses of Nothing with None.
llvm::Optional (like Swift.Optional!) uses None as its placeholder value,
not Nothing.

Swift SVN r22476
2014-10-02 18:51:42 +00:00
Dmitri Hrybenko
599b6f13b3 Use Swift's own wrapper instead of std::is_trivially_copyable
Swift SVN r22328
2014-09-28 02:21:15 +00:00
Jordan Rose
4f6b85c32c Add a new OptionalEnum type to encapsulate the "enum-value-or-nothing" pattern.
This implements the logic of storing "absent" values as 0 and "present"
values as the enumerator's underlying value plus 1. For enums whose raw
values are arbitrary or small, this is a safe, space-efficient way to add
the "absent" value.

The type has been designed to be used with PointerIntPair, so it converts
(explicitly) to intptr_t, and (explicitly) from any integral type.

Adopt this for use with the Accessibility bits in a ValueDecl.

No intended functionality change.

Swift SVN r20597
2014-07-26 22:43:51 +00:00