18 Commits

Author SHA1 Message Date
Ben Barham
a7b50f357f Merge remote-tracking branch 'origin/main' into manual-main-merge
Conflicts:
  - `lib/Driver/ToolChains.cpp` conflicting with the `addAllArgs` rename
    for multiple options
2024-09-16 13:53:18 -07:00
Dmitrii Galimzianov
a8b71ea97f Add -print-diagnostic-groups flag
This change adds the `-print-diagnostic-groups` flag as described by SE-0443.
2024-09-11 13:34:42 +02:00
Ben Barham
05d62155f8 Merge remote-tracking branch 'origin/main' into manual-main-20240814
Conflicts:
  - `include/swift/Localization/LocalizationFormat.h`
  - `lib/ClangImporter/SwiftLookupTable.cpp`
  - `lib/ClangImporter/SwiftLookupTable.h`
  - `lib/Serialization/ModuleFormat.h`
  - `lib/Serialization/Serialization.cpp`

All from the hash changes being added to main. Took main except for the
lookup table minor version, which needs to be bumped still because of
other changes.
2024-08-14 19:21:52 -07:00
Ben Barham
273d7ee79d [Serialization] Do not serialize unstable hashes
https://github.com/llvm/llvm-project/pull/96282 changed
`get_execution_seed` to be non-deterministic. Use stable hashes instead.
2024-08-13 19:51:35 -07:00
Ben Barham
cfbc007535 [rebranch] Do not serialize unstable hashes
https://github.com/llvm/llvm-project/pull/96282 changed
`get_execution_seed` to be non-deterministic. Use stable hashes instead.
2024-08-01 14:33:44 -07:00
Ben Barham
cacfd3e3ae Rename llvm::support::endianness to llvm::endianness
LLVM is gearing up to move to `std::endianness` and as part of that has
moved `llvm::support::endianness` to `llvm::endianness`
(bbdbcd83e6702f314d147a680247058a899ba261). Rename our uses.
2024-04-08 08:58:58 -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
Pavel Yaskevich
10b609caec [Localization] Remove YAML format and tool 2022-08-22 10:53:51 -07:00
Pavel Yaskevich
7c416ee122 [Localization] Implement .def to .strings converter
Format is as follows:

- Comment: /* ... */
- Diagnostic: "<id>" = "<translation>";
2022-08-22 09:22:18 -07:00
Hassan
481b29b6ca [Localization] Delay loading localization
- Add `LocalizationProducerState` to manage the states of LocalizationProducers.
- Add `initializeImpl` and `initializeIfNeeded` to manage lazily initialization of `LocalizationProducer`s.
- Move constructing a localization producer from DiagEngine to `LocalizationProrducer` itself.
2021-05-14 01:28:55 +02:00
Hassan
09b794d002 [Localization] Correct namings and improve comment 2021-03-23 22:39:35 +02:00
Hassan
8665e0cb55 [Localization] Move localization allocator from DiagEngine to the localization producer 2021-03-23 10:41:54 +02:00
Hassan
ef7551d4f5 [Localization] Add an allocator to to retain diagnostic strings 2021-03-17 10:23:02 +02:00
Hassan
651655e3db [Localization] Allocate a copy of diagnostic + name strings in LocalizationProducer 2021-03-14 17:38:34 +02:00
Hassan
1b0e8f9cec [Localization] Make localization producer handle printing diagnostics IDs 2021-03-14 17:38:34 +02:00
Pavel Yaskevich
c7a15e108c [Localization] Simplify localization producer interface
Require producers to implement `getMessage(DiagID)` and
establish default implementation of `getMessageOr`, so
producers don't have to worry about handling fallback if
translation is unavailable.
2020-09-16 11:47:07 -07:00
Pavel Yaskevich
5d11fe6b62 [Localization] Extract def-to-yaml conversion logic into DefToYAMLConverter to ease testing 2020-09-03 16:33:23 -07:00
Saleem Abdulrasool
fe0a945898 AST: split out diagnostics serialization
Create a new diagnostics serialization library, splitting out of
swiftAST to reduce the overheads for building the tooling for
cross-compiling the toolchain.  This should reduce the build time for
swift-serialize-diagnostics to enable cross-compilation.
2020-08-24 09:21:55 -07:00