This commit introduces the type system of the model along with several
various other improvements to the model and its users.
* Introduce the type system.
* Introduce possibility to tag certain fields in the model as to be
optional during YAML serialization.
* All the `Name` fields have been replaced in favor of `CustomName` plus
a `name` method that will use `CustomName` if available, or an
automatically generated name otherwise.
* Make TupleTreeReferences behavior more robust: now you either need to
have a valid pointer to `Root` and a `Path` or be default constructed
(`nullptr` for `Root` and an empty `Path`). Any other configuration is
invalid.
* The type system introduces `RawFunctionType`: this superseds the
previous way in which we were specifying arguments and return
values. Users of such information have been updated accordingly.
The previous design returned a model::Binary &, which did not allow
users writing the model to properly initialize cross references between
different parts of the model.
This was disabled because it triggered errors when compiling with older
versions of llvm-12 and -Werror.
With llvm-12 this needed anymore, so we can re-enable it
With llvm-12 thera are more stringent requirement on the propagation of
DebugLoc on CallInst and InvokeInst.
Various CallInst and InvokeInst created during lifting did not fulfill
these requirements, causing the Module to not verify() with llvm-12.
This commit fixes the problem, properly propagating the debug locations.
Fix compilation error: the expression 'co_await
__promise.final_suspend()' is required to be non-throwing
This compilation error started being triggered when switching to
clang-12.
Requires IsKeyedObjectContainer in TupleTree.h wherever possible,
instead of IsContainer. This enables using std::vectors.
In this way, they will not be diffed based on the key, but on the entire
vector. This is intended.
Add a specialization for
CallByPathVisitorWithInstance::visitContainerElement to handle cases
where the element of the container is an UpcastablePointer, that needs
to be unwrapped before visiting.
This fixes a problem causing bad TupleTree traversal with
TupleTreeReference. Specifically, CallByPathVisitorWithInstance did not
know how to visitContainerElement when the element of the container was
an UpcastablePointer. This caused the visit to always return nullptr
even when the TupleTreeReference was well-formed. This has been fixed by
adding an overload with proper concept constraint, that teaches
CallByPathVisitorWithInstance how to properly traverse
UpcastablePointers.
The second template parameter, defaulted to void, was only used for
SFINAE with enable_if. Now that all uses of enable_if are gone replaced
by concepts, this parameter does not serve any purpose anymore.
* Assert that the coroutine has reached its final suspension point
when the destructor is called.
* Ensure the move assignment operator takes an rvalue reference.
* Explicitly delete the copy assignment operator.
Checking if a `SwitchInst` has a certain case triggers a linear search.
When we have *a lot* of jump targets this is an issue.
This commit assumes that when we add a case to a dispatcher, that case
is not already there.