Commit Graph

6559 Commits

Author SHA1 Message Date
Ivan Krysak 75e505b2ec TTG: do not print an unnecessary comment
`Tracking helpers` comment would be printed even if invalidation is
disabled for a given TTG instance.
2025-10-13 18:33:10 +03:00
Ivan Krysak 782fb1d747 Yield: make TTG verification more strict
Some stuff that was before implicitly checked during deserialization
now need explicit checks, those are introduced here.
2025-10-13 18:33:10 +03:00
Ivan Krysak 859e122081 EFA: make TTG verification more strict
Some stuff that was before implicitly checked during deserialization
now need explicit checks, those are introduced here.

This also fixes test failures related to the changed serialization
format (which fields can or cannot be omitted when they have
the default value).
2025-10-13 18:33:10 +03:00
Ivan Krysak 29e0dc3b3f ABI: make TTG verification more strict
Some stuff that was before implicitly checked during deserialization
now need explicit checks, those are introduced here.
2025-10-13 18:33:10 +03:00
Ivan Krysak 6c0c758e67 Model: make TTG verification more strict
Some stuff that was before implicitly checked during deserialization
now need explicit checks, those are introduced here.

This also fixes test failures related to the changed serialization
format (which fields can or cannot be omitted when they have
the default value).
2025-10-13 18:33:10 +03:00
Ivan Krysak da7623acb0 TTG: introduce a simple isValid helper for enums
It checks whether value is within the valid range:
```
Invalid < Value < Count
```
2025-10-13 18:33:10 +03:00
Ivan Krysak cc57e57fd1 TTG: remove support for optional: true fields
After this commit, every non-key field is treated as if it was optional
while every key field (plus every auto-generated `Kind` field) - as if
it was required.
2025-10-13 18:33:10 +03:00
Ivan Krysak 59ffacf61b localCompare: mention fields as they are skipped 2025-10-13 18:33:10 +03:00
Ivan Krysak b38185c979 Model: rewrite TTG documentation
Big chunks of this file were outdated or otherwise awkward,
this brings it up-to-date with the current state of the TTG.
2025-10-13 18:33:10 +03:00
Ivan Krysak 10ca432cb2 TTG: simplify reference field usage
This allows to avoid having to specify the `rootType` (stable within
the entire tree) manually each time a reference is introduced.
Thanks to that, a much nicer syntax of:
```yaml
- name: MyTypeField
  reference-to: TypeDefinition
```
can replace the current one:
```yaml
- name: MyTypeField
  reference:
    pointeeType: TypeDefinition
    rootType: Binary
```
2025-10-13 18:33:10 +03:00
Ivan Krysak 480443f358 TTG: drop upcastable: configuration option
Instead, detect whether `UpcastablePointer` wrapping is needed or not
based on the type.
2025-10-13 18:33:10 +03:00
Ivan Krysak e9bb8c43cf TTG: make sure emission order is stable
Debugging is a lot harder when you cannot just diff outputs of
the generator.

This commit ensures types are always emitted in the same order,
no matter the input schema ordering or the target language.
2025-10-13 18:33:10 +03:00
Ivan Krysak d1fdb4d649 TTG: drop an unused global 2025-10-13 18:33:10 +03:00
Ivan Krysak 2315248938 TTG: remove a broken KOT-compatibility check 2025-10-13 18:33:10 +03:00
Ivan Krysak 38921fb85e TTG: drop an unnecessary TODO 2025-10-13 18:33:10 +03:00
Ivan Krysak d9ee804211 Do not use std::vector in model TTG docs
Currently, using `std::vector` in these breaks invalidation, so to
avoid potential confusion, we shouldn't use it in docs either.

Note that it's fine to use `std::vector` in non-invalidation-enabled
TTG instances.
2025-10-13 18:33:10 +03:00
Ivan Krysak 0dba3e0c69 Yield: improve TTG-schema formatting 2025-10-13 18:33:10 +03:00
Ivan Krysak de6db68394 EFA: improve TTG-schema formatting 2025-10-13 18:33:10 +03:00
Ivan Krysak 95845277a9 TTG: verify given schema 2025-10-13 18:33:10 +03:00
Ivan Krysak 00ea93c99e TTG: move metaschema.yml to share/revng/ 2025-10-13 18:33:10 +03:00
Ivan Krysak 04fdc2028a migrations: do not duplicate the template 2025-10-13 18:33:10 +03:00
Ivan Krysak 89282f31da Minor improvements 2025-10-13 18:33:10 +03:00
Pietro Fezzardi 6b976f4fda Merge branch 'feature/clift-directory-structure' 2025-10-13 15:31:59 +02:00
Lauri Vasama 22d6f70ee2 Clift directory structure overhaul 2025-10-13 15:08:20 +02:00
Lauri Vasama 3c191122dc Rename Clift to CliftDialect, CliftOps to Clift 2025-10-13 15:08:20 +02:00
Alessandro Di Federico c34aed5565 Merge branch 'feature/split-llvm-container' 2025-10-13 10:44:35 +02:00
Ivan Krysak 256d2310b0 DwarfImporter: drop an unnecessary check 2025-10-13 10:26:41 +03:00
Ivan Krysak df681aa573 Ensure consumed errors are printed somewhere 2025-10-13 10:26:41 +03:00
Ivan Krysak 25538385c8 Avoid using !! unless necessary
The only necessary place is when passing it into the  `BOOST_TEST`
macro, which doesn't convert its argument to `bool` internally.
2025-10-13 10:26:41 +03:00
Ivan Krysak a8e326f4d7 UpcastablePointer: improve documentation 2025-10-13 10:26:41 +03:00
Ivan Krysak e56f543b1a Split module.bc.zstd 2025-10-13 10:26:41 +03:00
Ivan Krysak fa24a51b05 Don't ignore TargetRegistry::lookupTarget output 2025-10-13 10:26:41 +03:00
Ivan Krysak 9bf93d3a30 Importers: add TODOs on diagnostic candidates 2025-10-13 10:26:41 +03:00
Ivan Krysak 16985c37ea Add comments clarifying error-related behavior 2025-10-13 10:26:41 +03:00
Ivan Krysak ed53e759c9 Do not use -Y flag
Yaml model are now the _only_ way to store them, no point in still
specifying the old flag for it.
2025-10-13 10:26:41 +03:00
Ivan Krysak 5717d835f8 Add missing llvm::Error checks 2025-10-13 10:26:37 +03:00
Ivan Krysak c11761ceb5 Pipes: drop unused invalidateFromDiff 2025-10-08 12:22:34 +03:00
Ivan Krysak 68d62428d8 Lift: drop free loadBinary function 2025-10-08 12:22:34 +03:00
Ivan Krysak d3bae70ba4 TupleTreeDiff: drop an unused overload 2025-10-08 12:22:34 +03:00
Ivan Krysak 0d9ea6db18 Inspector: drop a no-op llvm::consumeError 2025-10-08 12:22:34 +03:00
Ivan Krysak dadd836035 MetaAddress: assert validity 2025-10-08 12:22:34 +03:00
Ivan Krysak e6d30936f3 Avoid llvm::ExitOnError in non-tool binaries 2025-10-08 12:22:34 +03:00
Ivan Krysak 745b461568 Tools: use llvm::ExitOnError 2025-10-08 12:22:34 +03:00
Ivan Krysak a88747cf99 Drop unused includes 2025-10-08 12:22:34 +03:00
Ivan Krysak d1fbf2eee6 Model: Drop ToolHelpers.h 2025-10-08 12:22:34 +03:00
Ivan Krysak b6cb5c2ca3 UpcastablePointer: drop llvm::Error overload 2025-10-08 12:22:34 +03:00
Ivan Krysak d51ade0243 check-commit: add work-in-progress checks 2025-10-08 12:22:34 +03:00
Ivan Krysak ca712608f1 check-commit: more explicit error message 2025-10-08 12:22:34 +03:00
Ivan Krysak 77ea07c364 Minor improvements 2025-10-08 12:22:30 +03:00
Giacomo Vercesi 6d1fbdca97 Implement infrastructure for PipeRuns
Add the needed infrastructures that allow ephemeral classes (`PipeRun`s)
to be wrapped as a regular pypeline `Pipe` class. These automatically
have their dependencies tracked and propagated to the pypeline.
2025-10-03 17:40:45 +02:00