16 Commits

Author SHA1 Message Date
Alessandro Di Federico c883bed765 Drop Logger's StaticEnabled feature 2025-10-31 17:25:03 +01:00
Ivan Krysak 290d2e2c57 ptml::CTypeBuilder: rename into ModelCBuilder 2025-07-23 11:38:53 +02:00
Pietro Fezzardi 6b6037fc7a DependencyGraph: add doxygen 2025-05-29 09:31:26 +02:00
Pietro Fezzardi 0b977b85d6 DependencyGraph: add view() debug_function method
to open the graphviz visualization.
2025-05-29 09:31:26 +02:00
Pietro Fezzardi a71db5d243 DependencyGraph: refactor creation of nodes/edges 2025-05-28 17:11:57 +02:00
Pietro Fezzardi 82e57e1513 DependencyGraph: add addAndLogSuccessor helper 2025-05-28 17:11:54 +02:00
Pietro Fezzardi 75febb8aca Add DependencyGraph::Builder::addArtificialNodes 2025-05-28 17:11:53 +02:00
Pietro Fezzardi bdb59f597b Refactor DependencyGraph::Builder::addNodes
Now addNodes also adds an implicit dependency from the declaration node
to the definition node, and returns a data structure representing the
two nodes: declaration and definition.
2025-05-28 17:11:53 +02:00
Pietro Fezzardi 2d70710a55 DependencyGraph::Builder::addNodes returns nodes 2025-05-28 17:11:52 +02:00
Pietro Fezzardi c4b637eaa4 DependencyGraph: hide all non-const methods
This commits wraps all the machinery that can mutate a DependencyGraph
inside the interval factory class DependencyGraph::Builder.
In this way, once a DependencyGraph is created, it cannot be mutated by
accident from outside.
This is important because mutating it from outside makes it easy to
break the consistency of internal maps.
This risk will only increase when supporting artificial struct wrapper
types, so we encapsulate this now to prevent issues in the future.
2025-05-28 17:11:49 +02:00
Pietro Fezzardi 2331f10282 DependencyGraph: add new factory method and class 2025-05-28 17:11:11 +02:00
Pietro Fezzardi 660cb89eb5 DepenencyGraph: introduce AssociatedNodes
This data structure is used to bind together a pair of pointers to
TypeDependencyNode, one referring to a declaration of a type and the
other referring to a definition of the same type.

The definition can be null if the type referred to is a type without an
explicit definition (e.g. typedefs), while it's never null for types
for which have forward declaration that is separate from the definition
(e.g. structs and unions).
2025-05-28 17:11:11 +02:00
Pietro Fezzardi f353af775e TypeNode: add entries for artificial wrappers
This commit adds two enum entries to TypeNode::Kind to represent forward
declarations and definitions of artificial struct wrappers, that are not
present in the model but that we're forced to print in C to overcome
its limitations in representing types.

At the moment, this is only going to be used for representing return
types of RawFunctionDefinitions whose Layout returns RegisterSet, which
can't be represented in C without a wrapper.
2025-05-28 17:11:11 +02:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Alessandro Di Federico 143c315196 Merge revng-c into revng 2024-11-21 10:50:55 +01:00
Ivan Krysak 1a35cbcb77 Introduce PTMLCTypeBuilder 2024-10-15 10:45:13 +03:00