Commit Graph

10 Commits

Author SHA1 Message Date
Dmitri Gribenko
d4ff77550e Replaced include/swift/Basic/Algorithm.h with calls to standard algorithms
LLVM now requires C++14, and the header says the algorithms are
backported from C++14.
2020-02-24 14:52:48 +01:00
John McCall
a5d328690d PointerLikeTypeTraits is now a struct, not a class.
We compile with a pedantic warning that complains about these things,
and the massive flood of warnings is actually causing problems for the
build infrastructure.
2017-08-17 17:01:17 -04: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
Dan Raviv
29d76f3b68 Canonize swift header files headers and footers
- Added missing ifdef guard in PointerIntEnum header
- Consistent naming convention for ifdef guards
- Consistent 'end namespace swift'
- Consistent single EOL at end of header files
2016-03-23 09:04:12 +02:00
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
David Farler
3b9f1bd77f FlaggedPointer should only compose with itself
<rdar://problem/19104060>

LLVM's PointerIntPair always picks the highest bits of the available low
order free bits but NumLowBitsAvailable is the number of *lowest* bits
available from the LSB. This could cause problems with overwriting when
putting a FlaggedPointer inside a PointerIntPair. Just don't allow it.

Add a static assert to make sure there are enough bits to support the
number of nested FlaggedPointers.

Add a helper constexpr min function which isn't available until C++14.

Swift SVN r23597
2014-12-01 20:05:44 +00:00
David Farler
f92112256d Wrong comment header for FlaggedPointer.h
Swift SVN r23558
2014-11-22 22:03:32 +00:00
David Farler
3c4428dd78 Emit unique metadata for functions with inout
References to functions that take inout parameters crash the compiler
because InOutType isn't a "real" type in itself and has no special type
metadata to emit. It merely further qualifies the function's input
types.

For example, we would like to have a unique entry in the cache for:

var f: (T, T) -> ()

and

var f2: (inout T, T) -> ()

For each argument type metadata pointer in the function's input, take
advantage of pointer alignment and mark the lowest bit if it is inout.
Since the metadata cache uses pointers to create the key, this creates a
unique entry while still being able to extract the actual pointer.

This fixes <rdar://problem/17655125>, and a couple of other similar
crashes.

Swift SVN r23557
2014-11-22 22:01:23 +00:00