Commit Graph

8 Commits

Author SHA1 Message Date
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Ben Barham
9779c18da3 Rename startswith to starts_with
LLVM is presumably moving towards `std::string_view` -
`StringRef::startswith` is deprecated on tip. `SmallString::startswith`
was just renamed there (maybe with some small deprecation inbetween, but
if so, we've missed it).

The `SmallString::startswith` references were moved to
`.str().starts_with()`, rather than adding the `starts_with` on
`stable/20230725` as we only had a few of them. Open to switching that
over if anyone feels strongly though.
2024-03-13 22:25:47 -07:00
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
Nate Chandler
b535725647 [NFC] SIL: Renamed SpecifyTestInst.
The instruction's spelling was changed to `specify_test` but the class
name wasn't updated from `TestSpecificationInst`.  Update it here.
2024-02-06 16:29:09 -08:00
Nate Chandler
9e66a941fe [Test] Refer to inst results.
Via `.result[idx]`.
2023-10-20 18:16:38 -07:00
Nate Chandler
28f742e248 [SIL] Renamed specify_test instruction.
Changed from test_specification which is too many characters and
insufficiently active.
2023-09-22 16:09:38 -07:00
Nate Chandler
fe8cc46abf [SIL] Allow test_spec insts to take values.
Tests can now say %foo to refer to a value in addition to @instruction
or @argument or similar.
2023-09-22 09:10:39 -07:00
Nate Chandler
4374b6b58f [Test] Moved test_spec parsing to SIL.
In preparation for moving unit test infrastructure there so that it can
be used anywhere the SIL library is used.
2023-07-04 11:51:36 -07:00