9 Commits

Author SHA1 Message Date
Erik Eckstein
ab1b343dad use new llvm::Optional API
`getValue` -> `value`
`getValueOr` -> `value_or`
`hasValue` -> `has_value`
`map` -> `transform`

The old API will be deprecated in the rebranch.
To avoid merge conflicts, use the new API already in the main branch.

rdar://102362022
2022-11-21 19:44:24 +01:00
Michael Munday
192bcb2007 Basic: Use APInt to implement ClusteredBitVector
Simplify the implementation of ClusteredBitVector by using an APInt
to represent the raw bits. This simplification will make it easier
to incrementally move to a representation of bit vectors that works
on both big- and little-endian machines.

This commit also removes reserve and reserveExtra from the API
since they were only used in one place and no longer have any effect
because memory allocation is now handled by the APInt class.
2019-06-04 14:05:10 +01:00
Joe Groff
4428d479aa Fix ClusteredBitVector::fromAPInt for zero-sized vectors.
A one-bit zero APInt is a reasonable stand-in for everywhere we need this.
2018-11-14 14:05:21 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Sonny Falk
b39859f5c0 Fix compile error for 32-bit builds.
This fixes a compile error with int vs. unsigned long in the call to std::min(), similar to a few lines below.

Swift SVN r24480
2015-01-16 22:02:26 +00:00
John McCall
a7e2bb241b Fix some bit-vector bugs that weren't covered by my
random test generator and flesh out the API.

Swift SVN r24304
2015-01-09 10:05:43 +00:00
John McCall
05c67279fb Add a new bit-vector implementation optimized for
IRGen's needs.

Swift SVN r24295
2015-01-09 03:02:39 +00:00