This commit reduces build times by introducing a type-erasure layer when
performing a visit on TupleTrees. Basically instead of propagating the
type of the visitor along all of the template castle, we wrap the
visitor into a virtual class with one method for each possible type in
the TupleTree.
This enables a single instatiation of visit algorithm.
This commit ensures that `target_tuple_tree_generator` can handle being
invoke multiple times on the same target.
This avoids the need to create a dedicated library as a workaround.
We used to assign an uninitialized field to `false`. However, what we
really wanted to is to construct the optional by invoking the default
constructor of the `value_type` of the optional.
The index of an element of a `SortedVector<yield::Tag>` was saved, but
`SortedVector` behaves like a set.
The issue has been fixed by creating a temporary `Tag` instead of trying
to keep a reference to an existing one.
This commit adds a new pass, PrettyIntFormatting, that injects calls to
decorator functions print_hex, print_char, and print_bool around
llvm::ConstantInt in various situations.
It also updates the rest of passes of the decompilation pipelin to
understand these new decorator functions and to properly emit decorated
integer literals in the decompiled C code.
Before this commit, we did not take into consideration that
revng_call_stack_arguments has reference semantics, and we were using
its AddressOf in call sites that were taking the stack arguments.
This commit fixes the problem, bypassing the call to AddressOf when
passing the arguments to calls.
Before this commit, the code was assuming that we only passed stack
arguments to fuctions with RawFunction type. This is not true anymore.
This commit adds support to getStrongModelInfo for when we are passing
stack arguments to CABIFunctionType.
This commit handles the situation in which we have a call site with
stack arguments, but it was not possible to determine the stack height
at the call site.
The solution is to simply ignore stack arguments and emit in the IR a
warning.