Separate `ModelToHeader.cpp` into 3 different files:
1. DependencyGraph, used to calculate the precedence between
type declarations
2. ModelTypeNames, that holds all the naming logic, whose
primitives are accessible from other modules through a
public header
3. ModelToHeader, that now contains only the logic to print
out declarations and definitions
Also add a compilation test for the headers generated by this pass.
**Symptoms**: a correct visit of the GHAST resulted in an incorrect
visit order of the CFG (some instructions were visited before their
operands)
**Causes**: When creating the tile of a dispatcher with an inline
successor and a fallthrough, the predecessors of the dispatcher
were correctly connected to the new tile, but the fallthrough
was not, leading to a split in the GHAST between nodes that should
have been connected
**Solution**: Setting `PostDomBB = Fallthrough` if there is a
fallthrough just before calling `createTile()` corrects
this behavior, connecting the tile to its fallthrough node
We should never be changing the nature of a `while` node into a
`doWhile` and vice-versa: we only upgrade standard nodes in
either a `while` or a `doWhile`.
This commit imports all the revng pipes (and other support utilities) to
be used with `revng-pipeline`. In particular, the pipes necessary for
binary translations have been introduced.
The version of callOnPathSteps without an actual instance was completely
ignoring the upcasted type of `UpcastablePointer`s. We now fix this by
calling the right template specialization, which we choose by inspecting
the key of the `UpcastablePointer`.
This commit switches from `deduplicateNames`, which changed certain
`CustomName` values, to `promoteOriginalName`, which updates empty
`CustomName` using non-ambiguous versions of `OriginalName`.
The goal of `OriginalName` is to keep track of the original name of a
symbol upon import.
In future, this will also be used to promote it to `CustomName`.