Commit Graph

14 Commits

Author SHA1 Message Date
Ben Barham
ef8825bfe6 Migrate llvm::Optional to std::optional
LLVM has removed llvm::Optional, move over to std::optional. Also
clang-format to fix up all the renamed #includes.
2024-02-21 11:20:06 -08:00
Evan Wilde
26a974e772 [NFC] Headers headers headers!
Including headers that were being transitively included from LLVM
before. Also pointing them at the new locations for some of them.
2023-07-17 10:55:55 -07:00
Ben Langmuir
5a5dd13ca1 Include what you use: Optional and Hashing
Add a few includes of Optional.h and Hashing.h. These files are failing
ot build in the "next" branch due to changes in llvm's own includes, but
it's general goodness to include them on main as well.
2022-02-24 13:47:04 -08:00
Saleem Abdulrasool
910fbee14e gardening: make c++98-compat-extra-semi an error
This cleans up 90 instances of this warning and reduces the build spew
when building on Linux.  This helps identify actual issues when
building which can get lost in the stream of warning messages.  It also
helps restore the ability to build the compiler with gcc.
2021-11-27 11:40:17 -08:00
Robert Widmann
b960c6e31c Derive a Fingerprint from a Module's BasicSourceFileInfo 2021-02-02 09:57:46 -08:00
Saleem Abdulrasool
25d83bfb6b Basic: add explicit template parameters for disambiguation
When building with MSVC, this would fail to compile due to the `buffer`
type (`uint8_t [8]`) being treated as `unsigned char *`, which is
expecting to be SFINAE'd to fail find an overload for the hash
combination.
2021-01-23 13:32:20 -08:00
Robert Widmann
73ac8d3531 Replace llvm::MD5 with StableHasher 2021-01-21 17:19:38 -08:00
Robert Widmann
1fd5f0835a [NFC] Evict Mock Fingerprints Code From Interface 2021-01-19 11:44:41 -08:00
David Ungar
dbe4b6df43 Fix fingerprints in unit tests of driver. 2021-01-16 11:47:59 -08:00
David Ungar
7f36ab171b Allow Fingerprint::fromString to fail, returning None on bad input. 2021-01-15 13:46:46 -08:00
Robert Widmann
76a7ceea64 [NFC] Re-Core Fingerprint
Switch from a string core to a 128-bit integral core. This should make
Fingerprints much cheaper to copy around and sets us up for a future
where we can provide alternative implementations of the ambient hashing
algorithm.

rdar://72313506
2020-12-14 17:50:10 -08:00
Daniel Rodríguez Troitiño
42e0d33f49 [windows][msvc2017] Avoid initializer list constructor ambiguity.
MSVC2017 seems to not fallback to the correct overloaded constructor
when an initializer list constructor seems to be used, but only fails
because the conversion rules. Using parenthesis instead of braces seems
to indicate MSVC2017 the right constructor to use, and should work in
the rest of the compilers as well.

Seems that MSVC2019 is more resilient to this ambiguity.

Introduced in #34808 and started failing https://ci-external.swift.org/job/oss-swift-windows-x86_64/5953/
2020-11-19 16:41:06 -08:00
Robert Widmann
d2a98f3b0f Address Review Comments 2020-11-18 17:12:09 -08:00
Robert Widmann
8e5d64fa55 Add a Fingerprint Currency Type
A fingerprint is a stable hash of a particular piece of compiler data. This formalizes the stable notion of identity that the dependency trackers use for type body fingerprints in iterable decl contexts and the file-level interface hash
2020-11-18 12:20:14 -08:00