Commit Graph

52 Commits

Author SHA1 Message Date
Ivan Krysak c6a175a1b9 Rename _START_AT -> _STARTS_AT 2025-08-29 14:00:29 +03:00
Ivan Krysak 290d2e2c57 ptml::CTypeBuilder: rename into ModelCBuilder 2025-07-23 11:38:53 +02:00
Pietro Fezzardi ea3cbe4c1b Drop type inlining
Type inlining was a feature that allowed type definitions of
structs/unions/enums to be printed in C directly inside the definition
of another parent struct/union, if the inner type was only used once in
the parent type.

This kind of reasoning is inherently global: a type definition of the
subtype can be inlined in the parent type one only if *globally* the
subtype it isn't referred anywhere else.

This caused issues with type inlining inside definitions of stack types
in the body of functions. Indeed, for a given function, due to type
inlining, it was necessary to do global reasoning about what other types
could be inlined in the definition of the function's stack frame type.
This, in turn, had heavy consequences on invalidation, because any
change to any type (even if it wasn't referred in a given function's
body) was causing invalidation of all functions' bodies.

For this reason it was decided to drop the type inlining feature.
2025-05-28 17:11:56 +02:00
Pietro Fezzardi 8c7a800de1 Rename CTypeBuilder::printForwardTypeDeclaration
to printForwardDeclaration.
2025-05-28 17:11:11 +02:00
Ivan Krysak c7bba8c1b9 Prevent Support headers from depending on PTML 2025-05-08 15:42:01 +02:00
Giacomo Vercesi cf08ae41be Drop usage of llvm::ErrorOr<T>
Remove the last two remaining classes in revng which used the
`llvm::ErrorOr` class, replace them with `llvm::Expected`.
2025-05-05 16:02:40 +02:00
Ivan Krysak 79964eac74 Avoid ' misuse in error messages and comments 2025-04-17 16:41:21 +02:00
Ivan Krysak f070f1f1e1 Model: sunset double name system 2025-04-17 11:19:17 +03:00
Ivan Krysak 6ea75f02b3 Model: switch to the new namespace verifier 2025-04-15 16:35:42 +03:00
Ivan Krysak 3edb6cbb9b Minor improvements 2025-04-15 16:35:42 +03:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Ivan Krysak 288448f009 Never include model::VerifyHelper from headers 2025-02-13 13:09:50 +02:00
Alessandro Di Federico 143c315196 Merge revng-c into revng 2024-11-21 10:50:55 +01:00
Ivan Krysak 64446d0453 Adopt name builder across the model users 2024-11-06 19:18:53 +02:00
Ivan Krysak efbc5cdd5c Introduce an error creation helper 2024-11-06 19:18:53 +02:00
Alessandro Di Federico 98903f6b07 Move Ranks.h to revng 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 253558ba63 Minor changes 2024-11-04 15:09:56 +01:00
Ivan Krysak 1a35cbcb77 Introduce PTMLCTypeBuilder 2024-10-15 10:45:13 +03:00
Ivan Krysak 8aa7b55e2d PTMLIndentedOstream: rename into IndentedOstream 2024-10-15 09:13:28 +02:00
Ivan Krysak 8288bd68d2 PTMLCBuilder: rename into ptml::CBuilder 2024-10-15 09:13:28 +02:00
Alessandro Di Federico 045f982a32 Improve usage of Expected<T> 2024-10-09 15:16:55 +02:00
Alessandro Di Federico 8a5ae5f9c1 s/ExecutionContext &Ctx/ExecutionContext &EC/g 2024-09-27 10:35:10 +02:00
Alessandro Di Federico 08e1dc0f05 Drop no-op Pipe::checkPrecondition 2024-09-27 10:35:10 +02:00
Alessandro Di Federico ca99bbbb66 Adopt toString() 2024-09-26 17:51:08 +02:00
Ivan Krysak a8b5ebdd95 import-from-c: rework testing from the ground up 2024-09-04 16:55:49 +02:00
Pietro Fezzardi 4d845c5cdb HeaderToModel: drop unused Logger 2024-09-04 16:55:49 +02:00
Pietro Fezzardi 4e2617f4c5 HeaderToModel: fix double parsing of enums 2024-09-04 16:55:48 +02:00
Ivan Krysak d36e50e0d1 HeaderToModel: switch to the new annotation system 2024-09-04 16:44:23 +02:00
Ivan Krysak e67a08ce05 HeaderToModel: greatly improve reported errors 2024-09-04 16:43:40 +02:00
Ivan Krysak cc16b8f3c8 HeaderToModel: improve RFT argument handling 2024-09-04 16:43:23 +02:00
Ivan Krysak 60391c9ab6 HeaderToModel: forbid stack return values in RFTs 2024-09-04 16:43:07 +02:00
Ivan Krysak adb1551283 HeaderToModel: make type ID detection stricter 2024-09-04 16:42:50 +02:00
Ivan Krysak 73a723e9f4 HeaderToModel: rework error reporting 2024-09-04 16:42:29 +02:00
Ivan Krysak 748e4dd560 HeaderToModel: add code annotation support 2024-09-04 13:04:44 +03:00
Ivan Krysak cb82331a17 HeaderToModel: add struct size annotation support 2024-09-04 13:04:44 +03:00
Ivan Krysak e708f3f8fc HeaderToModel: add padding annotation support 2024-09-04 13:04:44 +03:00
Ivan Krysak ee22a5a558 HeaderToModel: clean up type replacement 2024-09-04 13:04:44 +03:00
Ivan Krysak 000d9f26aa HeaderToModel: revamp annotation parsing 2024-09-04 13:04:44 +03:00
Ivan Krysak b297bec1bb HeaderToModel: clean up global strings 2024-09-04 13:04:44 +03:00
Ivan Krysak dc6f2456be Minor improvements 2024-09-04 13:04:44 +03:00
Pietro Fezzardi dfe3f4cb47 Rename revng C headers for decompiled code
Strip away the 'revng-' prefix from the filename.
2024-06-27 17:26:18 -04:00
Ivan Krysak 94a0ad6b93 Adopt reworked model::Type 2024-06-27 11:07:01 +02:00
Ivan Krysak c2b4fb70bb Model: rename TypePath to DefinitionReference 2024-06-27 11:07:01 +02:00
Ivan Krysak 3705906074 Model: rename Type into TypeDefinition 2024-06-27 11:07:01 +02:00
Lauri Vasama e2f3f31093 Introduce RawFunctionType::Architecture 2024-05-29 15:43:35 +02:00
Lauri Vasama d49a06bf25 Fix spelling of DefaultRawType 2024-05-29 15:43:35 +02:00
Alessandro Di Federico b05ab6ff3c Make Pipe::checkPrecondition mandatory 2024-05-21 09:44:04 +02:00
Giacomo Vercesi f8e50acc49 ImportFromCAnalysis: fix getOptionsfromCFGFile
Rewrite the `getOptionsfromCFGFile` function using llvm facilities.
The new code has the following features.
- It avoids the default behaviour of `std::fstream` of opening the file
in read-write.
- It's stricter should an error occur when opening the file.
2024-03-01 16:07:45 +01:00
Giacomo Vercesi 94904b2ad8 HeaderToModel: output all error lines
Change the behaviour of `HeaderToModelDiagnosticConsumer` to report all
error lines instead of the last one.
2024-03-01 16:07:45 +01:00
Alessandro Di Federico 0c212b66d9 Relicense to MIT 2024-02-29 17:03:36 +01:00